Vulkan/wsi: Implement VK_EXT_display_surface_counter
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 16 Jun 2018 17:44:11 +0000 (10:44 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 20 Jun 2018 15:16:03 +0000 (08:16 -0700)
commitb1a013d035230957bdd619a1049424b35e69d6eb
treeac5c830927fe48a4d30c2dbf4c8191c7a0212ed2
parent8f3b58ebee413fc704fb2fa0fab06dbfe146b08a
Vulkan/wsi: Implement VK_EXT_display_surface_counter

This extension is required to support EXT_display_control as it offers a
way to query whether the vblank counter is supported.  Internally, it is
implemented using a fake MESA extension which provides a chain-in to
GetSurfaceCapabilities2KHR which contains the one added field.  This has
the advantage of reducing number of callbacks needed in the back-ends.
It also means that anything chained into GetSurfaceCapabilities2EXT
through VkSurfaceCapabilities2KHR::pNext so we only need to handle
crawling the pNext chain once per back-end.

Reviewed-by: Keith Packard <keithp@keithp.com>
src/vulkan/wsi/wsi_common.c
src/vulkan/wsi/wsi_common.h