@@ -4770,3 +4770,11 @@ radv_GetDeviceGroupPeerMemoryFeatures(
VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT |
VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT;
}
+
+VkResult radv_QueryCurrentTimestampMESA(VkDevice _device, uint64_t *timestamp)
+{
+ RADV_FROM_HANDLE(radv_device, device, _device);
+
+ *timestamp = device->ws->query_value(device->ws, RADEON_TIMESTAMP);
+ return VK_SUCCESS;
+}
@@ -107,6 +107,7 @@ EXTENSIONS = [
Extension('VK_AMD_shader_core_properties', 1, True),
Extension('VK_AMD_shader_info', 1, True),
Extension('VK_AMD_shader_trinary_minmax', 1, True),
+ Extension('VK_MESA_query_timestamp', 1, True),
]
class VkVersion:
@@ -75,6 +75,7 @@ typedef uint32_t xcb_window_t;
#include <vulkan/vulkan_intel.h>
#include <vulkan/vk_icd.h>
#include <vulkan/vk_android_native_buffer.h>
+#include <vulkan/vk_mesa_query_timestamp.h>
#include "radv_entrypoints.h"
This extension adds a single function to query the current GPU timestamp, just like glGetInteger64v(GL_TIMESTAMP, ×tamp). This function is needed to complete the implementation of GOOGLE_display_timing, which needs to be able to correlate GPU and CPU timestamps. Signed-off-by: Keith Packard <keithp@keithp.com> --- src/amd/vulkan/radv_device.c | 8 ++++++++ src/amd/vulkan/radv_extensions.py | 1 + src/amd/vulkan/radv_private.h | 1 + 3 files changed, 10 insertions(+)