diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_extensions.py | 1 | ||||
-rw-r--r-- | src/intel/vulkan/anv_extensions.py | 1 | ||||
-rw-r--r-- | src/vulkan/wsi/wsi_common_display.c | 25 | ||||
-rw-r--r-- | src/vulkan/wsi/wsi_common_wayland.c | 21 | ||||
-rw-r--r-- | src/vulkan/wsi/wsi_common_x11.c | 20 |
5 files changed, 61 insertions, 7 deletions
diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py index 986ef26876d..1fae95a5de1 100644 --- a/src/amd/vulkan/radv_extensions.py +++ b/src/amd/vulkan/radv_extensions.py @@ -84,6 +84,7 @@ EXTENSIONS = [ Extension('VK_KHR_shader_draw_parameters', 1, True), Extension('VK_KHR_storage_buffer_storage_class', 1, True), Extension('VK_KHR_surface', 25, 'RADV_HAS_SURFACE'), + Extension('VK_KHR_surface_protected_capabilities', 1, 'RADV_HAS_SURFACE'), Extension('VK_KHR_swapchain', 68, 'RADV_HAS_SURFACE'), Extension('VK_KHR_variable_pointers', 1, True), Extension('VK_KHR_wayland_surface', 6, 'VK_USE_PLATFORM_WAYLAND_KHR'), diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py index e4404c59f34..650b8dac31a 100644 --- a/src/intel/vulkan/anv_extensions.py +++ b/src/intel/vulkan/anv_extensions.py @@ -107,6 +107,7 @@ EXTENSIONS = [ Extension('VK_KHR_shader_draw_parameters', 1, True), Extension('VK_KHR_storage_buffer_storage_class', 1, True), Extension('VK_KHR_surface', 25, 'ANV_HAS_SURFACE'), + Extension('VK_KHR_surface_protected_capabilities', 1, 'ANV_HAS_SURFACE'), Extension('VK_KHR_swapchain', 68, 'ANV_HAS_SURFACE'), Extension('VK_KHR_variable_pointers', 1, True), Extension('VK_KHR_wayland_surface', 6, 'VK_USE_PLATFORM_WAYLAND_KHR'), diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_display.c index 987b6dd715a..09c18315623 100644 --- a/src/vulkan/wsi/wsi_common_display.c +++ b/src/vulkan/wsi/wsi_common_display.c @@ -758,10 +758,27 @@ wsi_get_display_plane_capabilities2( assert(capabilities->sType == VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR); - return wsi_get_display_plane_capabilities(physical_device, wsi_device, - pDisplayPlaneInfo->mode, - pDisplayPlaneInfo->planeIndex, - &capabilities->capabilities); + VkResult result = + wsi_get_display_plane_capabilities(physical_device, wsi_device, + pDisplayPlaneInfo->mode, + pDisplayPlaneInfo->planeIndex, + &capabilities->capabilities); + + vk_foreach_struct(ext, capabilities->pNext) { + switch (ext->sType) { + case VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR: { + VkSurfaceProtectedCapabilitiesKHR *protected = (void *)ext; + protected->supportsProtected = VK_FALSE; + break; + } + + default: + /* Ignored */ + break; + } + } + + return result; } VkResult diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index 87fcbae26c4..a312a99d412 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -526,8 +526,25 @@ wsi_wl_surface_get_capabilities2(VkIcdSurfaceBase *surface, { assert(caps->sType == VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR); - return wsi_wl_surface_get_capabilities(surface, wsi_device, - &caps->surfaceCapabilities); + VkResult result = + wsi_wl_surface_get_capabilities(surface, wsi_device, + &caps->surfaceCapabilities); + + vk_foreach_struct(ext, caps->pNext) { + switch (ext->sType) { + case VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR: { + VkSurfaceProtectedCapabilitiesKHR *protected = (void *)ext; + protected->supportsProtected = VK_FALSE; + break; + } + + default: + /* Ignored */ + break; + } + } + + return result; } static VkResult diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 04ef9148f90..c87b9312636 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -532,7 +532,25 @@ x11_surface_get_capabilities2(VkIcdSurfaceBase *icd_surface, { assert(caps->sType == VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR); - return x11_surface_get_capabilities(icd_surface, wsi_device, &caps->surfaceCapabilities); + VkResult result = + x11_surface_get_capabilities(icd_surface, wsi_device, + &caps->surfaceCapabilities); + + vk_foreach_struct(ext, caps->pNext) { + switch (ext->sType) { + case VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR: { + VkSurfaceProtectedCapabilitiesKHR *protected = (void *)ext; + protected->supportsProtected = VK_FALSE; + break; + } + + default: + /* Ignored */ + break; + } + } + + return result; } static VkResult |