From d6859da3b465609a47ce02e700f5f408f5a5d4b8 Mon Sep 17 00:00:00 2001 From: Manuel Stoeckl Date: Sat, 21 Oct 2023 22:06:43 -0400 Subject: render/vulkan: use _SRGB image view when possible This is the last of a set of commits which ensures that both textures and render buffers can be accessed through _UNORM and _SRGB image views. While _UNORM image views are not yet used for 8-bpc image formats, they will be needed in the future to support color transforms for both textures and render buffers. --- include/render/vulkan.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/render/vulkan.h b/include/render/vulkan.h index 2794f340..3a3daed7 100644 --- a/include/render/vulkan.h +++ b/include/render/vulkan.h @@ -394,6 +394,7 @@ struct wlr_vk_texture { bool owned; // if dmabuf_imported: whether we have ownership of the image bool transitioned; // if dma_imported: whether we transitioned it away from preinit bool has_alpha; // whether the image is has alpha channel + bool using_mutable_srgb; // is this accessed through _SRGB format view struct wl_list foreign_link; // wlr_vk_renderer.foreign_textures struct wl_list destroy_link; // wlr_vk_command_buffer.destroy_textures struct wl_list link; // wlr_vk_renderer.textures @@ -411,7 +412,7 @@ struct wlr_vk_texture *vulkan_get_texture(struct wlr_texture *wlr_texture); VkImage vulkan_import_dmabuf(struct wlr_vk_renderer *renderer, const struct wlr_dmabuf_attributes *attribs, VkDeviceMemory mems[static WLR_DMABUF_MAX_PLANES], uint32_t *n_mems, - bool for_render); + bool for_render, bool *using_mutable_srgb); struct wlr_texture *vulkan_texture_from_buffer( struct wlr_renderer *wlr_renderer, struct wlr_buffer *buffer); void vulkan_texture_destroy(struct wlr_vk_texture *texture); -- cgit v1.2.3