[PATCH 1/7] vulkan: Add VK_EXT_display_surface_counter [v4]

Jason Ekstrand jason at jlekstrand.net
Sat Jun 16 18:22:07 UTC 2018


On Thu, Jun 14, 2018 at 7:52 PM, Keith Packard <keithp at keithp.com> wrote:

> This extension is required to support EXT_display_control as it offers
> a way to query whether the vblank counter is supported.
>
> v2: Thanks to kisak
>
>     Fix spelling of VkSurfaceCapabilities2EXT in wsi_common_wayland.c,
>     it was using ext instead of EXT.
>
>     Fix spelling of VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT
>
> v3: Fix wayland WSI, regularize spelling
>
>     Misspelled 'surface' in get_capabilities2ext
>     Remove extra _ from get_capabilities_2ext in a couple of places
>
> v4: Adopt Jason Ekstrand's coding conventions
>
>     Declare variables at first use, eliminate extra whitespace
>     between types and names. Wrap lines to 80 columns.
>
>     Suggested-by: Jason Ekstrand <jason.ekstrand at intel.com>
>
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
>  src/vulkan/wsi/wsi_common.c         | 12 ++++++++++++
>  src/vulkan/wsi/wsi_common.h         |  6 ++++++
>  src/vulkan/wsi/wsi_common_display.c | 27 +++++++++++++++++++++++++++
>  src/vulkan/wsi/wsi_common_private.h |  3 +++
>  src/vulkan/wsi/wsi_common_wayland.c | 27 +++++++++++++++++++++++++++
>  src/vulkan/wsi/wsi_common_x11.c     | 27 +++++++++++++++++++++++++++
>  6 files changed, 102 insertions(+)
>
> diff --git a/src/vulkan/wsi/wsi_common_private.h
> b/src/vulkan/wsi/wsi_common_private.h
> index 3d502b9fc9d..b97d2d8ba06 100644
> --- a/src/vulkan/wsi/wsi_common_private.h
> +++ b/src/vulkan/wsi/wsi_common_private.h
> @@ -109,6 +109,9 @@ struct wsi_interface {
>     VkResult (*get_capabilities2)(VkIcdSurfaceBase *surface,
>                                   const void *info_next,
>                                   VkSurfaceCapabilities2KHR*
> pSurfaceCapabilities);
> +   VkResult (*get_capabilities2ext)(VkIcdSurfaceBase *surface,
> +                                    VkSurfaceCapabilities2EXT*
> +                                    pSurfaceCapabilities);
>

I really don't like adding a third get_capabilities hook.  An alternative
way to do this would be to add a pseud-extension which allows you do get he
extra bit of data with a chain-in on vkGetSurfaceCapabilities2KHR.  I sent
two patches which do just that.  If you like them, I'm happy do do the
reabase for you if you'd like.

--Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20180616/3fdb7a7b/attachment.html>


More information about the dri-devel mailing list