summaryrefslogtreecommitdiff
path: root/thirdparty/vulkan/loader/extension_manual.c
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/vulkan/loader/extension_manual.c')
-rw-r--r--thirdparty/vulkan/loader/extension_manual.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/thirdparty/vulkan/loader/extension_manual.c b/thirdparty/vulkan/loader/extension_manual.c
index 640db2f789..490496d7c7 100644
--- a/thirdparty/vulkan/loader/extension_manual.c
+++ b/thirdparty/vulkan/loader/extension_manual.c
@@ -58,6 +58,17 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceSurfaceCapabilities2K
uint8_t icd_index = phys_dev_term->icd_index;
if (icd_term->dispatch.GetPhysicalDeviceSurfaceCapabilities2KHR != NULL) {
+ VkBaseOutStructure *pNext = (VkBaseOutStructure *)pSurfaceCapabilities->pNext;
+ while (pNext != NULL) {
+ if ((int)pNext->sType == VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR) {
+ // Not all ICDs may be supporting VK_KHR_surface_protected_capabilities
+ // Initialize VkSurfaceProtectedCapabilitiesKHR.supportsProtected to false and
+ // if an ICD supports protected surfaces, it will reset it to true accordingly.
+ ((VkSurfaceProtectedCapabilitiesKHR *)pNext)->supportsProtected = VK_FALSE;
+ }
+ pNext = (VkBaseOutStructure *)pNext->pNext;
+ }
+
// Pass the call to the driver, possibly unwrapping the ICD surface
if (icd_surface->real_icd_surfaces != NULL && (void *)icd_surface->real_icd_surfaces[icd_index] != NULL) {
VkPhysicalDeviceSurfaceInfo2KHR info_copy = *pSurfaceInfo;