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.
master
Simon Ser 2 years ago
parent 091aa5582a
commit fe7c998666

@ -681,7 +681,7 @@ static struct wlr_vk_texture *vulkan_texture_from_dmabuf(
.components.r = VK_COMPONENT_SWIZZLE_IDENTITY, .components.r = VK_COMPONENT_SWIZZLE_IDENTITY,
.components.g = VK_COMPONENT_SWIZZLE_IDENTITY, .components.g = VK_COMPONENT_SWIZZLE_IDENTITY,
.components.b = 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_IDENTITY
: VK_COMPONENT_SWIZZLE_ONE, : VK_COMPONENT_SWIZZLE_ONE,

Loading…
Cancel
Save