radv: Implement VK_KHR_get_surface_capabilities2
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 17 Nov 2017 01:15:27 +0000 (17:15 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 4 Dec 2017 18:04:19 +0000 (10:04 -0800)
The WSI core code does all the hard work.  Just add the wrappers and
turn it on.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
src/amd/vulkan/radv_extensions.py
src/amd/vulkan/radv_wsi.c

index 4af137c9c131d4c8581e355d637c5c113f531b6d..493d1ed77494ca4b90846f754a010c2a2d6ce249 100644 (file)
@@ -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),
index cb61eb660241788da08d8643fc2a6a04f049688e..51e8ec666f7ea5f4641b084fe99a425656eb0b80 100644 (file)
@@ -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,