@@ -96,6 +96,7 @@ EXTENSIONS = [
Extension('VK_AMD_rasterization_order', 1, 'device->rad_info.chip_class >= VI && device->rad_info.max_se >= 2'),
Extension('VK_AMD_shader_info', 1, True),
Extension('VK_MESA_query_timestamp', 1, True),
+ Extension('VK_GOOGLE_display_timing', 1, True),
]
class VkVersion:
@@ -247,3 +247,35 @@ VkResult radv_QueuePresentKHR(
queue->queue_family_index,
pPresentInfo);
}
+
+/* VK_GOOGLE_display_timing */
+VkResult
+radv_GetRefreshCycleDurationGOOGLE(
+ VkDevice _device,
+ VkSwapchainKHR swapchain,
+ VkRefreshCycleDurationGOOGLE *pDisplayTimingProperties)
+{
+ RADV_FROM_HANDLE(radv_device, device, _device);
+ struct radv_physical_device *pdevice = device->physical_device;
+
+ return wsi_common_get_refresh_cycle_duration(&pdevice->wsi_device,
+ _device,
+ swapchain,
+ pDisplayTimingProperties);
+}
+
+VkResult
+radv_GetPastPresentationTimingGOOGLE(VkDevice _device,
+ VkSwapchainKHR swapchain,
+ uint32_t *pPresentationTimingCount,
+ VkPastPresentationTimingGOOGLE *pPresentationTimings)
+{
+ RADV_FROM_HANDLE(radv_device, device, _device);
+ struct radv_physical_device *pdevice = device->physical_device;
+
+ return wsi_common_get_past_presentation_timing(&pdevice->wsi_device,
+ _device,
+ swapchain,
+ pPresentationTimingCount,
+ pPresentationTimings);
+}
This adds support for the VK_GOOGLE_display timing extension. Signed-off-by: Keith Packard <keithp@keithp.com> --- src/amd/vulkan/radv_extensions.py | 1 + src/amd/vulkan/radv_wsi.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+)