From 9f938f7f2a2a54443471d5c67dfcacb56569e4dd Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 29 Nov 2022 09:48:01 +0100 Subject: render/vulkan: add more packed formats --- render/vulkan/pixel_format.c | 60 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) (limited to 'render') diff --git a/render/vulkan/pixel_format.c b/render/vulkan/pixel_format.c index 72de40c7..4d49f32f 100644 --- a/render/vulkan/pixel_format.c +++ b/render/vulkan/pixel_format.c @@ -54,10 +54,70 @@ static const struct wlr_vk_format formats[] = { // Vulkan packed formats have the same channel order as DRM formats on // little endian systems. #if WLR_LITTLE_ENDIAN + { + .drm = DRM_FORMAT_RGBA4444, + .vk = VK_FORMAT_R4G4B4A4_UNORM_PACK16, + }, + { + .drm = DRM_FORMAT_RGBX4444, + .vk = VK_FORMAT_R4G4B4A4_UNORM_PACK16, + }, + { + .drm = DRM_FORMAT_BGRA4444, + .vk = VK_FORMAT_B4G4R4A4_UNORM_PACK16, + }, + { + .drm = DRM_FORMAT_BGRX4444, + .vk = VK_FORMAT_B4G4R4A4_UNORM_PACK16, + }, { .drm = DRM_FORMAT_RGB565, .vk = VK_FORMAT_R5G6B5_UNORM_PACK16, }, + { + .drm = DRM_FORMAT_BGR565, + .vk = VK_FORMAT_B5G6R5_UNORM_PACK16, + }, + { + .drm = DRM_FORMAT_RGBA5551, + .vk = VK_FORMAT_R5G5B5A1_UNORM_PACK16, + }, + { + .drm = DRM_FORMAT_RGBX5551, + .vk = VK_FORMAT_R5G5B5A1_UNORM_PACK16, + }, + { + .drm = DRM_FORMAT_BGRA5551, + .vk = VK_FORMAT_B5G5R5A1_UNORM_PACK16, + }, + { + .drm = DRM_FORMAT_BGRX5551, + .vk = VK_FORMAT_B5G5R5A1_UNORM_PACK16, + }, + { + .drm = DRM_FORMAT_ARGB1555, + .vk = VK_FORMAT_A1R5G5B5_UNORM_PACK16, + }, + { + .drm = DRM_FORMAT_XRGB1555, + .vk = VK_FORMAT_A1R5G5B5_UNORM_PACK16, + }, + { + .drm = DRM_FORMAT_ARGB2101010, + .vk = VK_FORMAT_A2R10G10B10_UNORM_PACK32, + }, + { + .drm = DRM_FORMAT_XRGB2101010, + .vk = VK_FORMAT_A2R10G10B10_UNORM_PACK32, + }, + { + .drm = DRM_FORMAT_ABGR2101010, + .vk = VK_FORMAT_A2B10G10R10_UNORM_PACK32, + }, + { + .drm = DRM_FORMAT_XBGR2101010, + .vk = VK_FORMAT_A2B10G10R10_UNORM_PACK32, + }, #endif }; -- cgit v1.2.3