@@ -129,12 +129,14 @@ libvulkan_radeon_la_SOURCES = $(VULKAN_GEM_FILES)
vulkan_api_xml = $(top_srcdir)/src/vulkan/registry/vk.xml
vk_android_native_buffer_xml = $(top_srcdir)/src/vulkan/registry/vk_android_native_buffer.xml
+vk_mesa_query_timestamp_xml = $(top_srcdir)/src/vulkan/registry/vk_mesa_query_timestamp.xml
radv_entrypoints.c: radv_entrypoints_gen.py radv_extensions.py $(vulkan_api_xml)
$(MKDIR_GEN)
$(AM_V_GEN)$(PYTHON2) $(srcdir)/radv_entrypoints_gen.py \
--xml $(vulkan_api_xml) \
--xml $(vk_android_native_buffer_xml) \
+ --xml $(vk_mesa_query_timestamp_xml) \
--outdir $(builddir)
radv_entrypoints.h: radv_entrypoints.c
@@ -144,6 +146,7 @@ radv_extensions.c: radv_extensions.py \
$(AM_V_GEN)$(PYTHON2) $(srcdir)/radv_extensions.py \
--xml $(vulkan_api_xml) \
--xml $(vk_android_native_buffer_xml) \
+ --xml $(vk_mesa_query_timestamp_xml) \
--out $@
vk_format_table.c: vk_format_table.py \
@@ -20,10 +20,10 @@
radv_entrypoints = custom_target(
'radv_entrypoints.[ch]',
- input : ['radv_entrypoints_gen.py', vk_api_xml],
+ input : ['radv_entrypoints_gen.py', vk_api_xml, vk_android_native_buffer_xml, vk_mesa_query_timestamp_xml],
output : ['radv_entrypoints.h', 'radv_entrypoints.c'],
command : [
- prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--outdir',
+ prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--xml', '@INPUT2@', '--xml', '@INPUT3@', '--outdir',
meson.current_build_dir()
],
depend_files : files('radv_extensions.py'),
@@ -31,10 +31,10 @@ radv_entrypoints = custom_target(
radv_extensions_c = custom_target(
'radv_extensions.c',
- input : ['radv_extensions.py', vk_api_xml, vk_android_native_buffer_xml],
+ input : ['radv_extensions.py', vk_api_xml, vk_android_native_buffer_xml, vk_mesa_query_timestamp_xml],
output : ['radv_extensions.c'],
command : [
- prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--xml', '@INPUT2@', '--out', '@OUTPUT@',
+ prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--xml', '@INPUT2@', '--xml', '@INPUT3@', '--out', '@OUTPUT@',
],
)
@@ -4083,3 +4083,11 @@ radv_DebugReportMessageEXT(VkInstance _instance,
vk_debug_report(&instance->debug_report_callbacks, flags, objectType,
object, location, messageCode, pLayerPrefix, pMessage);
}
+
+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;
+}
@@ -95,6 +95,7 @@ EXTENSIONS = [
Extension('VK_AMD_draw_indirect_count', 1, True),
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),
]
class VkVersion:
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 coorelate GPU and CPU timestamps. Signed-off-by: Keith Packard <keithp@keithp.com> --- src/amd/vulkan/Makefile.am | 3 +++ src/amd/vulkan/meson.build | 8 ++++---- src/amd/vulkan/radv_device.c | 8 ++++++++ src/amd/vulkan/radv_extensions.py | 1 + 4 files changed, 16 insertions(+), 4 deletions(-)