From 51b059dd1173550fc2b9a748e9306ea45297475a Mon Sep 17 00:00:00 2001 From: Vishnu Vardan Date: Sat, 25 Apr 2026 23:45:38 -0400 Subject: [PATCH] mesa/st: remove can_dither from st_context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit can_dither is a direct copy of screen->caps.dithering. Read the cap from the screen directly. Reviewed-by: Marek Olšák Part-of: --- src/mesa/state_tracker/st_atom_blend.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/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c index 1b58072268c..6366ee7ae5e 100644 --- a/src/mesa/state_tracker/st_atom_blend.c +++ b/src/mesa/state_tracker/st_atom_blend.c @@ -333,7 +333,7 @@ st_update_blend( struct st_context *st ) /* no blending / logicop */ } - if (st->can_dither) + if (st->screen->caps.dithering) blend->dither = ctx->Color.DitherFlag; if (_mesa_is_multisample_enabled(ctx) && diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index fc004e65011..2889841b8df 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->can_dither = - screen->caps.dithering; st->lower_flatshade = !screen->caps.flatshade; st->lower_alpha_test = diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index 5f4c42ece9c..24cd80656cd 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 can_dither; bool can_bind_const_buffer_as_vertex; bool lower_flatshade; bool lower_alpha_test;