render/vulkan: track and use _UNORM variants of _SRGB formats

Later commits will start using _SRGB image views again,
where appropriate.
This commit is contained in:
Manuel Stoeckl 2023-10-21 21:04:04 -04:00 committed by Simon Ser
parent 6287b61025
commit eab89d6c76
4 changed files with 16 additions and 15 deletions

View file

@ -374,7 +374,8 @@ struct wlr_vk_texture_view *vulkan_texture_get_or_create_view(struct wlr_vk_text
static void texture_set_format(struct wlr_vk_texture *texture,
const struct wlr_vk_format *format) {
texture->format = format;
texture->transform = !format->is_ycbcr && format->is_srgb ?
texture->transform = !format->is_ycbcr &&
(format->vk_srgb && false /* temporary */) ?
WLR_VK_TEXTURE_TRANSFORM_IDENTITY : WLR_VK_TEXTURE_TRANSFORM_SRGB;
const struct wlr_pixel_format_info *format_info =