From bfb752c6a36e5acb80bc8360a89c4dabda8169df Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 16 Mar 2026 10:10:00 +0200 Subject: [PATCH] vulkan/wsi: write VkImageCompressionControlEXT from swapchain to image creation Signed-off-by: Lionel Landwerlin Reviewed-by: Nanley Chery Part-of: --- src/vulkan/wsi/wsi_common.c | 9 +++++++++ src/vulkan/wsi/wsi_common_private.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index 44367b6b80b..abbe514b9d2 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -756,6 +756,15 @@ wsi_configure_image(const struct wsi_swapchain *chain, __vk_append_struct(&info->create, &info->ext_mem); } + const VkImageCompressionControlEXT *sc_compr_ctrl = + vk_find_struct_const(pCreateInfo->pNext, + IMAGE_COMPRESSION_CONTROL_EXT); + if (sc_compr_ctrl != NULL) { + info->img_compr_ctrl = *sc_compr_ctrl; + info->img_compr_ctrl.pNext = NULL; + __vk_append_struct(&info->create, &info->img_compr_ctrl); + } + info->wsi = (struct wsi_image_create_info) { .sType = VK_STRUCTURE_TYPE_WSI_IMAGE_CREATE_INFO_MESA, }; diff --git a/src/vulkan/wsi/wsi_common_private.h b/src/vulkan/wsi/wsi_common_private.h index 0b90eacca85..dde0a37f4d9 100644 --- a/src/vulkan/wsi/wsi_common_private.h +++ b/src/vulkan/wsi/wsi_common_private.h @@ -87,6 +87,7 @@ struct wsi_image_info { VkExternalMemoryImageCreateInfo ext_mem; VkImageFormatListCreateInfo format_list; VkImageDrmFormatModifierListCreateInfoEXT drm_mod_list; + VkImageCompressionControlEXT img_compr_ctrl; VkColorSpaceKHR color_space; enum wsi_image_type image_type;