mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 04:45:58 +01:00
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:
parent
091aa5582a
commit
fe7c998666
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
||||
|
|
Loading…
Reference in a new issue