dmabuf: Add Vulkan formats to the large table

This is done without testing, just doing my best to map all the DRM
formats to VkFormats.

Once people start using them, they'll figure it out when it's wrong.
(Somebody needs to write a testsuite.)
This commit is contained in:
Benjamin Otte
2023-12-16 18:59:13 +01:00
parent cccec91b66
commit b19f71dd24
2 changed files with 773 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,10 @@
#include "gdkdmabufformatsbuilderprivate.h"
#ifdef GDK_RENDERING_VULKAN
#include <vulkan/vulkan.h>
#endif
#define GDK_DMABUF_MAX_PLANES 4
typedef struct _GdkDmabuf GdkDmabuf;
@@ -70,5 +74,9 @@ gboolean gdk_dmabuf_fourcc_is_yuv (guint32
gboolean gdk_dmabuf_get_memory_format (guint32 fourcc,
gboolean premultiplied,
GdkMemoryFormat *out_format);
#ifdef GDK_RENDERING_VULKAN
VkFormat gdk_dmabuf_get_vk_format (guint32 fourcc,
VkComponentMapping *out_components);
#endif
#endif