From 5b34fe55136cca32c10e70e5fe44fea2d7c6520d Mon Sep 17 00:00:00 2001 From: zccrs Date: Wed, 9 Nov 2022 17:57:56 +0800 Subject: render/vulkan: add wlr_vk_texture_has_alpha Allow to get whether has alpha channel of the VkImage, it can help an optimization to disable blending when the texture doesn't have alpha. Because the VkFormat isn't enough because it's always set to VK_FORMAT_B8G8R8A8_SRGB or VK_FORMAT_R8G8B8A8_SRGB. --- include/wlr/render/vulkan.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/wlr/render') diff --git a/include/wlr/render/vulkan.h b/include/wlr/render/vulkan.h index aec3a3c2..04c877e4 100644 --- a/include/wlr/render/vulkan.h +++ b/include/wlr/render/vulkan.h @@ -32,6 +32,7 @@ bool wlr_texture_is_vk(struct wlr_texture *texture); void wlr_vk_texture_get_image_attribs(struct wlr_texture *texture, struct wlr_vk_image_attribs *attribs); +bool wlr_vk_texture_has_alpha(struct wlr_texture *texture); #endif -- cgit v1.2.3