aboutsummaryrefslogtreecommitdiff
path: root/include/render
diff options
context:
space:
mode:
authorManuel Stoeckl <code@mstoeckl.com>2023-10-21 22:06:43 -0400
committerSimon Ser <contact@emersion.fr>2023-12-04 15:13:31 +0000
commitd6859da3b465609a47ce02e700f5f408f5a5d4b8 (patch)
treeb404377c58be57d868cd01fa516a50e0a36b0ae5 /include/render
parent566c413d8ff70f075a7481035605ec710d610f45 (diff)
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.
Diffstat (limited to 'include/render')
-rw-r--r--include/render/vulkan.h3
1 files changed, 2 insertions, 1 deletions
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);