diff options
author | Jason Ekstrand <[email protected]> | 2017-11-16 17:15:27 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-12-04 10:04:19 -0800 |
commit | 1e565bc6cea7e82925f066f797b3425cd2e69280 (patch) | |
tree | d0bb61d1a0d71915be4129b95cbed6a55b699516 | |
parent | 0a10e3770f79e5e5c450e31ff1bfc2d045940b56 (diff) |
radv: Implement VK_KHR_get_surface_capabilities2
The WSI core code does all the hard work. Just add the wrappers and
turn it on.
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_extensions.py | 1 | ||||
-rw-r--r-- | src/amd/vulkan/radv_wsi.c | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py index 4af137c9c13..493d1ed7749 100644 --- a/src/amd/vulkan/radv_extensions.py +++ b/src/amd/vulkan/radv_extensions.py @@ -61,6 +61,7 @@ EXTENSIONS = [ Extension('VK_KHR_external_semaphore_fd', 1, 'device->rad_info.has_syncobj'), Extension('VK_KHR_get_memory_requirements2', 1, True), Extension('VK_KHR_get_physical_device_properties2', 1, True), + Extension('VK_KHR_get_surface_capabilities2', 1, True), Extension('VK_KHR_image_format_list', 1, True), Extension('VK_KHR_incremental_present', 1, True), Extension('VK_KHR_maintenance1', 1, True), diff --git a/src/amd/vulkan/radv_wsi.c b/src/amd/vulkan/radv_wsi.c index cb61eb66024..51e8ec666f7 100644 --- a/src/amd/vulkan/radv_wsi.c +++ b/src/amd/vulkan/radv_wsi.c @@ -90,6 +90,18 @@ VkResult radv_GetPhysicalDeviceSurfaceCapabilitiesKHR( pSurfaceCapabilities); } +VkResult radv_GetPhysicalDeviceSurfaceCapabilities2KHR( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + VkSurfaceCapabilities2KHR* pSurfaceCapabilities) +{ + RADV_FROM_HANDLE(radv_physical_device, device, physicalDevice); + + return wsi_common_get_surface_capabilities2(&device->wsi_device, + pSurfaceInfo, + pSurfaceCapabilities); +} + VkResult radv_GetPhysicalDeviceSurfaceFormatsKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, @@ -104,6 +116,20 @@ VkResult radv_GetPhysicalDeviceSurfaceFormatsKHR( pSurfaceFormats); } +VkResult radv_GetPhysicalDeviceSurfaceFormats2KHR( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + uint32_t* pSurfaceFormatCount, + VkSurfaceFormat2KHR* pSurfaceFormats) +{ + RADV_FROM_HANDLE(radv_physical_device, device, physicalDevice); + + return wsi_common_get_surface_formats2(&device->wsi_device, + pSurfaceInfo, + pSurfaceFormatCount, + pSurfaceFormats); +} + VkResult radv_GetPhysicalDeviceSurfacePresentModesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, |