summaryrefslogtreecommitdiffstats
path: root/src/vulkan/wsi
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-12-12 10:54:26 -0600
committerJason Ekstrand <[email protected]>2019-03-18 17:02:10 +0000
commit493b3ada9b177e1294168e27cf4ab2b9886a33e4 (patch)
tree7fbb600ddb377040b28132852d27a758bcb13bd8 /src/vulkan/wsi
parentecb98c68988570806c239c7cc705c69a98aafc23 (diff)
anv,radv: Implement VK_KHR_surface_capability_protected
Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/vulkan/wsi')
-rw-r--r--src/vulkan/wsi/wsi_common_display.c25
-rw-r--r--src/vulkan/wsi/wsi_common_wayland.c21
-rw-r--r--src/vulkan/wsi/wsi_common_x11.c20
3 files changed, 59 insertions, 7 deletions
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