mesa/st: remove has_time_elapsed from st_context

has_time_elapsed is a direct copy of screen->caps.query_time_elapsed.
Read the cap from the screen directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
This commit is contained in:
Vishnu Vardan 2026-04-25 22:17:03 -04:00 committed by Marge Bot
parent 9455710aaf
commit 3b092a7950
3 changed files with 1 additions and 4 deletions

View file

@ -183,7 +183,7 @@ begin_query(struct gl_context *ctx, struct gl_query_object *q)
type = PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE;
break;
case GL_TIME_ELAPSED:
if (st->has_time_elapsed)
if (st->screen->caps.query_time_elapsed)
type = PIPE_QUERY_TIME_ELAPSED;
else
type = PIPE_QUERY_TIMESTAMP;

View file

@ -581,8 +581,6 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
st->alpha_border_color_is_not_w =
!!(screen->caps.texture_border_color_quirk &
PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_ALPHA_NOT_W);
st->has_time_elapsed =
screen->caps.query_time_elapsed;
ctx->Const.GLSLHasHalfFloatPacking =
screen->caps.shader_pack_half_float;
st->has_multi_draw_indirect =

View file

@ -144,7 +144,6 @@ struct st_context
GLboolean clamp_frag_color_in_shader;
GLboolean clamp_vert_color_in_shader;
bool thread_scheduler_disabled;
bool has_time_elapsed;
bool has_etc1;
bool has_etc2;
bool transcode_etc;