Merge 'Support VK_KHR_swapchain_maintenance1' into 'main'

See merge request mesa/vulkan-wsi-layer!208
This commit is contained in:
Rosen Zhelev 2025-10-16 16:02:36 +01:00
commit b259fa8cbe
6 changed files with 23 additions and 5 deletions

View file

@ -33,6 +33,7 @@ implements the following extensions:
* VK_KHR_present_id2 * VK_KHR_present_id2
* VK_KHR_swapchain_mutable_format (For Headless and Wayland only) * VK_KHR_swapchain_mutable_format (For Headless and Wayland only)
* VK_KHR_present_wait2 * VK_KHR_present_wait2
* VK_KHR_swapchain_maintenance1
## Building ## Building

View file

@ -47,6 +47,13 @@
"vkReleaseSwapchainImagesEXT" "vkReleaseSwapchainImagesEXT"
] ]
}, },
{
"name": "VK_KHR_swapchain_maintenance1",
"spec_version": "1",
"entrypoints": [
"vkReleaseSwapchainImagesKHR"
]
},
{ {
"name": "VK_EXT_present_timing", "name": "VK_EXT_present_timing",
"spec_version": "1", "spec_version": "1",

View file

@ -670,6 +670,15 @@ wsi_layer_vkGetDeviceProcAddr(VkDevice device, const char *funcName) VWL_API_POS
GET_PROC_ADDR(vkReleaseSwapchainImagesEXT); GET_PROC_ADDR(vkReleaseSwapchainImagesEXT);
} }
/* VK_KHR_swapchain_maintenance1 */
if (device_data.is_device_extension_enabled(VK_KHR_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME))
{
if (!strcmp(funcName, "vkReleaseSwapchainImagesKHR"))
{
return (PFN_vkVoidFunction)&wsi_layer_vkReleaseSwapchainImagesEXT;
}
}
/* VK_KHR_present_wait */ /* VK_KHR_present_wait */
if (device_data.is_device_extension_enabled(VK_KHR_PRESENT_WAIT_EXTENSION_NAME)) if (device_data.is_device_extension_enabled(VK_KHR_PRESENT_WAIT_EXTENSION_NAME))
{ {

View file

@ -469,8 +469,9 @@ private:
GetBufferMemoryRequirements2) \ GetBufferMemoryRequirements2) \
EP(GetImageSparseMemoryRequirements2KHR, VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME, VK_API_VERSION_1_1, \ EP(GetImageSparseMemoryRequirements2KHR, VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME, VK_API_VERSION_1_1, \
false, GetImageSparseMemoryRequirements2) \ false, GetImageSparseMemoryRequirements2) \
/* VK_EXT_swapchain_maintenance1 */ \ /* VK_KHR_swapchain_maintenance1 */ \
EP(ReleaseSwapchainImagesEXT, VK_EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME, VK_API_VERSION_1_1, false, ) \ EP(ReleaseSwapchainImagesEXT, VK_EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME, API_VERSION_MAX, false, \
ReleaseSwapchainImagesKHR) \
/* VK_EXT_calibrated_timestamps */ \ /* VK_EXT_calibrated_timestamps */ \
EP(GetCalibratedTimestampsEXT, VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME, API_VERSION_MAX, false, ) \ EP(GetCalibratedTimestampsEXT, VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME, API_VERSION_MAX, false, ) \
/* VK_KHR_calibrated_timestamps */ \ /* VK_KHR_calibrated_timestamps */ \

View file

@ -55,4 +55,4 @@ wsi_layer_vkReleaseSwapchainImagesEXT(VkDevice device, const VkReleaseSwapchainI
sc->release_images(pReleaseInfo->imageIndexCount, pReleaseInfo->pImageIndices); sc->release_images(pReleaseInfo->imageIndexCount, pReleaseInfo->pImageIndices);
return VK_SUCCESS; return VK_SUCCESS;
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2024 Arm Limited. * Copyright (c) 2024-2025 Arm Limited.
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@ -35,4 +35,4 @@
VWL_VKAPI_CALL(VkResult) VWL_VKAPI_CALL(VkResult)
wsi_layer_vkReleaseSwapchainImagesEXT(VkDevice device, wsi_layer_vkReleaseSwapchainImagesEXT(VkDevice device,
const VkReleaseSwapchainImagesInfoEXT *pReleaseInfo) VWL_API_POST; const VkReleaseSwapchainImagesInfoEXT *pReleaseInfo) VWL_API_POST;