anv: Add VK_EXT_display_surface_counter to anv driver [v2]
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:34 +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.

v2:
Add extension to list in alphabetical order

Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_extensions.py
src/intel/vulkan/anv_wsi.c

index 2bba4ee4d2bceea327fa8d1ff684a3085d116fbf..ecef1b254bfefef03ad7860a858534be9443b022 100644 (file)
@@ -113,6 +113,7 @@ EXTENSIONS = [
     Extension('VK_EXT_acquire_xlib_display',              1, 'VK_USE_PLATFORM_XLIB_XRANDR_EXT'),
     Extension('VK_EXT_debug_report',                      8, True),
     Extension('VK_EXT_direct_mode_display',               1, 'VK_USE_PLATFORM_DISPLAY_KHR'),
+    Extension('VK_EXT_display_surface_counter',           1, 'VK_USE_PLATFORM_DISPLAY_KHR'),
     Extension('VK_EXT_external_memory_dma_buf',           1, True),
     Extension('VK_EXT_global_priority',                   1,
               'device->has_context_priority'),
index a7efb1416fa90d54a12f172c43f8f90eedd4b934..1403601e9c0720f96b354156569ff5cb9e71ec48 100644 (file)
@@ -120,6 +120,18 @@ VkResult anv_GetPhysicalDeviceSurfaceCapabilities2KHR(
                                                pSurfaceCapabilities);
 }
 
+VkResult anv_GetPhysicalDeviceSurfaceCapabilities2EXT(
+       VkPhysicalDevice                            physicalDevice,
+       VkSurfaceKHR                                surface,
+       VkSurfaceCapabilities2EXT*                  pSurfaceCapabilities)
+{
+   ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
+
+   return wsi_common_get_surface_capabilities2ext(&device->wsi_device,
+                                                  surface,
+                                                  pSurfaceCapabilities);
+}
+
 VkResult anv_GetPhysicalDeviceSurfaceFormatsKHR(
     VkPhysicalDevice                            physicalDevice,
     VkSurfaceKHR                                surface,