virgl: enable timer queries only if host supports it

Timer queries is tied to GL_ARB_timer_query/GL_EXT_disjoint_timer_query
support on the host. We have a flag that detects this so lets use it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20380>
This commit is contained in:
osy
2022-12-18 18:29:50 -08:00
committed by Marge Bot
parent f2740ac69c
commit 1c72424770
+3 -2
View File
@@ -199,9 +199,10 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_NIR_IMAGES_AS_DEREF:
return 0;
case PIPE_CAP_QUERY_TIMESTAMP:
return 1;
case PIPE_CAP_QUERY_TIME_ELAPSED:
return 1;
if (vscreen->caps.caps.v2.host_feature_check_version >= 15)
return vscreen->caps.caps.v1.bset.timer_query;
return 1; /* older versions had this always enabled */
case PIPE_CAP_TGSI_TEXCOORD:
return vscreen->caps.caps.v2.host_feature_check_version >= 10;
case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT: