render/vulkan: use identity swizzle for YCbCr formats

Fixes the following validation error:

    [ VUID-VkImageViewCreateInfo-pNext-01970 ] Object 0: handle = 0x62e00003c400, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xf378e14b | vkCreateImageView(): If there is a VkSamplerYcbcrConversion, the imageView must be created with the identity swizzle.
This commit is contained in:
Simon Ser 2023-05-05 14:33:42 +02:00
parent 091aa5582a
commit fe7c998666
1 changed files with 1 additions and 1 deletions

View File

@ -681,7 +681,7 @@ static struct wlr_vk_texture *vulkan_texture_from_dmabuf(
.components.r = VK_COMPONENT_SWIZZLE_IDENTITY,
.components.g = VK_COMPONENT_SWIZZLE_IDENTITY,
.components.b = VK_COMPONENT_SWIZZLE_IDENTITY,
.components.a = texture->has_alpha
.components.a = texture->has_alpha || fmt->format.is_ycbcr
? VK_COMPONENT_SWIZZLE_IDENTITY
: VK_COMPONENT_SWIZZLE_ONE,