mesa/st: remove has_occlusion_query from st_context

has_occlusion_query is a direct copy of
screen->caps.occlusion_query.
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:40:19 -04:00 committed by Marge Bot
parent de3a22ba1d
commit 69aa46f63e
3 changed files with 1 additions and 4 deletions

View file

@ -138,7 +138,7 @@ query_type_is_dummy(struct gl_context *ctx, unsigned type)
case PIPE_QUERY_OCCLUSION_COUNTER:
case PIPE_QUERY_OCCLUSION_PREDICATE:
case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE:
return !st->has_occlusion_query;
return !st->screen->caps.occlusion_query;
case PIPE_QUERY_PIPELINE_STATISTICS:
return !st->has_pipeline_stat;
case PIPE_QUERY_PIPELINE_STATISTICS_SINGLE:

View file

@ -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_occlusion_query =
screen->caps.occlusion_query;
st->has_single_pipe_stat =
screen->caps.query_pipeline_statistics_single;
st->has_pipeline_stat =

View file

@ -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_occlusion_query;
bool has_single_pipe_stat;
bool has_pipeline_stat;
bool has_indep_blend_enable;