radv: Add VK_EXT_display_surface_counter to radv driver
authorKeith Packard <keithp@keithp.com>
Wed, 11 Oct 2017 07:20:08 +0000 (00:20 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 20 Jun 2018 15:16:45 +0000 (08:16 -0700)
This extension is required to support EXT_display_control as it offers
a way to query whether the vblank counter is supported.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/amd/vulkan/radv_extensions.py
src/amd/vulkan/radv_wsi.c

index 65ce73490165129f3d851b1412fed3e99fb48cb6..601a345b114dbbd93b0b7abf1eb3999c0dbea683 100644 (file)
@@ -89,6 +89,7 @@ EXTENSIONS = [
     Extension('VK_KHR_display',                          23, 'VK_USE_PLATFORM_DISPLAY_KHR'),
     Extension('VK_EXT_direct_mode_display',               1, 'VK_USE_PLATFORM_DISPLAY_KHR'),
     Extension('VK_EXT_acquire_xlib_display',              1, 'VK_USE_PLATFORM_XLIB_XRANDR_EXT'),
+    Extension('VK_EXT_display_surface_counter',           1, 'VK_USE_PLATFORM_DISPLAY_KHR'),
     Extension('VK_EXT_debug_report',                      9, True),
     Extension('VK_EXT_depth_range_unrestricted',          1, True),
     Extension('VK_EXT_descriptor_indexing',               2, True),
index 2840b6667273d53fb58498f46cf49287218630b6..204841771354fddc3e75ad6064cd182abd4484ea 100644 (file)
@@ -103,6 +103,18 @@ VkResult radv_GetPhysicalDeviceSurfaceCapabilities2KHR(
                                                    pSurfaceCapabilities);
 }
 
+VkResult radv_GetPhysicalDeviceSurfaceCapabilities2EXT(
+       VkPhysicalDevice                            physicalDevice,
+       VkSurfaceKHR                                surface,
+       VkSurfaceCapabilities2EXT*                  pSurfaceCapabilities)
+{
+       RADV_FROM_HANDLE(radv_physical_device, device, physicalDevice);
+
+       return wsi_common_get_surface_capabilities2ext(&device->wsi_device,
+                                                      surface,
+                                                      pSurfaceCapabilities);
+}
+
 VkResult radv_GetPhysicalDeviceSurfaceFormatsKHR(
        VkPhysicalDevice                            physicalDevice,
        VkSurfaceKHR                                surface,