diff options
author | Jason Ekstrand <[email protected]> | 2018-06-16 10:27:40 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-06-20 08:16:03 -0700 |
commit | 8f3b58ebee413fc704fb2fa0fab06dbfe146b08a (patch) | |
tree | 33c9dcf3a7e135b42235b1c360317aafa60846af /src/vulkan/wsi/wsi_common.c | |
parent | 7f3cb7db08e4c172072a29b69cb33be4d9b8f562 (diff) |
vulkan/wsi: Get rid of the get_capabilities hook
Instead, we can just use get_capabilities2. This way back-ends only
have to implement one hook.
Reviewed-by: Keith Packard <[email protected]>
Diffstat (limited to 'src/vulkan/wsi/wsi_common.c')
-rw-r--r-- | src/vulkan/wsi/wsi_common.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index 142c5d8fe58..ab5b2dba0da 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -695,7 +695,16 @@ wsi_common_get_surface_capabilities(struct wsi_device *wsi_device, ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, _surface); struct wsi_interface *iface = wsi_device->wsi[surface->platform]; - return iface->get_capabilities(surface, pSurfaceCapabilities); + VkSurfaceCapabilities2KHR caps2 = { + .sType = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR, + }; + + VkResult result = iface->get_capabilities2(surface, NULL, &caps2); + + if (result == VK_SUCCESS) + *pSurfaceCapabilities = caps2.surfaceCapabilities; + + return result; } VkResult |