render/vulkan: add more packed formats

Simon Ser 2 years ago
parent 171c9081d1
commit 9f938f7f2a

@ -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
};

Loading…
Cancel
Save