From 3b092a7950b47ed7d84d703b6815820267a9e29f Mon Sep 17 00:00:00 2001 From: Vishnu Vardan Date: Sat, 25 Apr 2026 22:17:03 -0400 Subject: [PATCH] mesa/st: remove has_time_elapsed from st_context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Part-of: --- src/mesa/main/queryobj.c | 2 +- src/mesa/state_tracker/st_context.c | 2 -- src/mesa/state_tracker/st_context.h | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index 0c1771423dc..dc48f3381b7 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -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; diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 00bde0fff9b..2abd078e377 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -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 = diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index 32cf610d609..31bacdf696e 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -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;