zink: enable pipe caps for ARB_timer_query
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6923>
diff --git a/docs/features.txt b/docs/features.txt
index 610241d..12f8feb 100644
--- a/docs/features.txt
+++ b/docs/features.txt
@@ -106,7 +106,7 @@
GL_ARB_shader_bit_encoding DONE (freedreno, swr, v3d, panfrost)
GL_ARB_texture_rgb10_a2ui DONE (freedreno, swr, zink, panfrost)
GL_ARB_texture_swizzle DONE (freedreno, swr, v3d, zink, panfrost)
- GL_ARB_timer_query DONE (freedreno, swr)
+ GL_ARB_timer_query DONE (freedreno, swr, zink)
GL_ARB_instanced_arrays DONE (freedreno, swr, v3d, panfrost, zink)
GL_ARB_vertex_type_2_10_10_10_rev DONE (freedreno, swr, v3d, panfrost)
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index 44f84dc..6951f39 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -116,10 +116,8 @@
case PIPE_CAP_OCCLUSION_QUERY:
return 1;
-#if 0 /* TODO: Enable me */
case PIPE_CAP_QUERY_TIME_ELAPSED:
return 1;
-#endif
case PIPE_CAP_TEXTURE_MULTISAMPLE:
return 1;
@@ -184,10 +182,8 @@
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
return screen->info.props.limits.minUniformBufferOffsetAlignment;
-#if 0 /* TODO: Enable me */
case PIPE_CAP_QUERY_TIMESTAMP:
- return 1;
-#endif
+ return screen->info.have_EXT_calibrated_timestamps;
case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
return screen->info.props.limits.minMemoryMapAlignment;