vulkan/wsi: write VkImageCompressionControlEXT from swapchain to image creation

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40429>
This commit is contained in:
Lionel Landwerlin 2026-03-16 10:10:00 +02:00
parent 7094ad91e3
commit bfb752c6a3
2 changed files with 10 additions and 0 deletions

View file

@ -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,
};

View file

@ -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;