From f046e4d2fe1b4d91ffe5bba33449f65786014a10 Mon Sep 17 00:00:00 2001 From: Vishnu Vardan Date: Sat, 25 Apr 2026 23:36:35 -0400 Subject: [PATCH] mesa/st: remove has_pipeline_stat from st_context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit has_pipeline_stat is a direct copy of screen->caps.query_pipeline_statistics. 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 b505f669c98..074a008d301 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -140,7 +140,7 @@ query_type_is_dummy(struct gl_context *ctx, unsigned type) case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE: return !st->screen->caps.occlusion_query; case PIPE_QUERY_PIPELINE_STATISTICS: - return !st->has_pipeline_stat; + return !st->screen->caps.query_pipeline_statistics; case PIPE_QUERY_PIPELINE_STATISTICS_SINGLE: return !st->screen->caps.query_pipeline_statistics_single; default: diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 95a30245670..04f117b3ebe 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -583,8 +583,6 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe, PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_ALPHA_NOT_W); ctx->Const.GLSLHasHalfFloatPacking = screen->caps.shader_pack_half_float; - st->has_pipeline_stat = - screen->caps.query_pipeline_statistics; st->has_indep_blend_enable = screen->caps.indep_blend_enable; st->has_indep_blend_func = diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index 056d5401373..7dfe624ccec 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -159,7 +159,6 @@ struct st_context bool force_compute_based_texture_transfer; bool force_specialized_compute_transfer; bool force_persample_in_shader; - bool has_pipeline_stat; bool has_indep_blend_enable; bool has_indep_blend_func; bool can_dither;