All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
To: mesa-dev@lists.freedesktop.org
Cc: Keith Packard <keithp@keithp.com>, dri-devel@lists.freedesktop.org
Subject: [PATCH 20/21] anv: Add VK_GOOGLE_display_timing extension to anv driver
Date: Tue, 13 Feb 2018 16:31:33 -0800	[thread overview]
Message-ID: <20180214003134.1552-21-keithp@keithp.com> (raw)
In-Reply-To: <20180214003134.1552-1-keithp@keithp.com>

This adds support for the VK_GOOGLE_display timing extension.

Signed-off-by: Keith Packard <keithp@keithp.com>
---
 src/intel/vulkan/anv_extensions.py |  1 +
 src/intel/vulkan/anv_wsi.c         | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py
index 7706ccdb5bb..b441b8e1d8e 100644
--- a/src/intel/vulkan/anv_extensions.py
+++ b/src/intel/vulkan/anv_extensions.py
@@ -92,6 +92,7 @@ EXTENSIONS = [
     Extension('VK_EXT_display_surface_counter',           1, 'VK_USE_PLATFORM_DISPLAY_KHR'),
     Extension('VK_EXT_display_control',                   1, 'VK_USE_PLATFORM_DISPLAY_KHR'),
     Extension('VK_MESA_query_timestamp',                  1, True),
+    Extension('VK_GOOGLE_display_timing',                 1, True),
 ]
 
 class VkVersion:
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c
index 52362adfb71..7801a989e0d 100644
--- a/src/intel/vulkan/anv_wsi.c
+++ b/src/intel/vulkan/anv_wsi.c
@@ -239,3 +239,32 @@ VkResult anv_QueuePresentKHR(
                                    _queue, 0,
                                    pPresentInfo);
 }
+
+/* VK_GOOGLE_display_timing */
+VkResult
+anv_GetRefreshCycleDurationGOOGLE(VkDevice                      _device,
+                                  VkSwapchainKHR                swapchain,
+                                  VkRefreshCycleDurationGOOGLE  *pDisplayTimingProperties)
+{
+   ANV_FROM_HANDLE(anv_device, device, _device);
+
+   return wsi_common_get_refresh_cycle_duration(&device->instance->physicalDevice.wsi_device,
+                                                _device,
+                                                swapchain,
+                                                pDisplayTimingProperties);
+}
+
+VkResult
+anv_GetPastPresentationTimingGOOGLE(VkDevice                            _device,
+                                    VkSwapchainKHR                      swapchain,
+                                    uint32_t                            *pPresentationTimingCount,
+                                    VkPastPresentationTimingGOOGLE      *pPresentationTimings)
+{
+   ANV_FROM_HANDLE(anv_device, device, _device);
+
+   return wsi_common_get_past_presentation_timing(&device->instance->physicalDevice.wsi_device,
+                                                  _device,
+                                                  swapchain,
+                                                  pPresentationTimingCount,
+                                                  pPresentationTimings);
+}
-- 
2.15.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-02-14  0:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14  0:31 [PATCH 0/21] Add KHR_display through GOOGLE_display_timing [v2] Keith Packard
2018-02-14  0:31 ` [PATCH 01/21] vulkan: Add KHR_display extension using DRM Keith Packard
2018-02-24  0:43   ` Jason Ekstrand
2018-02-24  9:43     ` Daniel Stone
2018-03-07 20:28       ` [Mesa-dev] " Keith Packard
2018-03-07 20:15     ` Keith Packard
2018-02-14  0:31 ` [PATCH 02/21] anv: Add KHR_display extension to anv Keith Packard
2018-02-14  0:31 ` [PATCH 03/21] radv: Add KHR_display extension to radv Keith Packard
2018-02-14  0:31 ` [PATCH 04/21] vulkan: Add EXT_direct_mode_display Keith Packard
2018-02-14  0:31 ` [PATCH 05/21] anv: Add EXT_direct_mode_display to anv driver Keith Packard
2018-02-14  0:31 ` [PATCH 06/21] radv: Add EXT_direct_mode_display to radv driver Keith Packard
2018-02-14  0:31 ` [PATCH 07/21] vulkan: Add EXT_acquire_xlib_display Keith Packard
2018-02-14 12:13   ` [Mesa-dev] " Eric Engestrom
2018-02-15 20:26     ` Keith Packard
2018-02-14  0:31 ` [PATCH 08/21] anv: Add EXT_acquire_xlib_display to anv driver Keith Packard
2018-02-14  0:31 ` [PATCH 09/21] radv: Add EXT_acquire_xlib_display to radv driver Keith Packard
2018-02-14  0:31 ` [PATCH 10/21] vulkan: Add VK_EXT_display_surface_counter [v3] Keith Packard
2018-02-14  0:31 ` [PATCH 11/21] anv: Add VK_EXT_display_surface_counter to anv driver [v4] Keith Packard
2018-02-14  0:31 ` [PATCH 12/21] radv: Add VK_EXT_display_surface_counter to radv driver Keith Packard
2018-02-14  0:31 ` [PATCH 13/21] vulkan: add VK_EXT_display_control [v3] Keith Packard
2018-02-14  0:31 ` [PATCH 14/21] anv: add VK_EXT_display_control to anv driver Keith Packard
2018-02-14  0:31 ` [PATCH 15/21] radv: add VK_EXT_display_control to radv driver Keith Packard
2018-02-14  0:31 ` [PATCH 16/21] vulkan: Define new VK_MESA_query_timestamp extension Keith Packard
2018-02-14  0:31 ` [PATCH 17/21] anv: Add new VK_MESA_query_timestamp extension to anv driver Keith Packard
2018-02-14  0:31 ` [PATCH 18/21] radv: Add new VK_MESA_query_timestamp extension to radv driver Keith Packard
2018-02-14  0:31 ` [PATCH 19/21] vulkan: Add VK_GOOGLE_display_timing extension (x11 and display backends) Keith Packard
2018-02-14  0:31 ` Keith Packard [this message]
2018-02-14  0:31 ` [PATCH 21/21] radv: Add VK_GOOGLE_display_timing extension to radv driver Keith Packard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180214003134.1552-21-keithp@keithp.com \
    --to=keithp@keithp.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=mesa-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.