From 9650f8fd34dfe301f21b6929a22476ea3a21e46e Mon Sep 17 00:00:00 2001 From: Vishnu Vardan Date: Sat, 25 Apr 2026 23:39:20 -0400 Subject: [PATCH] mesa/st: remove has_indep_blend_enable from st_context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit has_indep_blend_enable is a direct copy of screen->caps.indep_blend_enable. 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 75ebf9a0015..e4d3c731a3d 100644 --- a/src/mesa/state_tracker/st_atom_blend.c +++ b/src/mesa/state_tracker/st_atom_blend.c @@ -149,7 +149,7 @@ allow_rgb_colormask_promotion(const struct st_context *st, /* We can support different per-RT promotion decisions if we driver * supports independent blending (but we must actually enable it). */ - if (st->has_indep_blend_enable && !same) { + if (st->screen->caps.indep_blend_enable && !same) { *need_independent_blend = true; return true; } diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 04f117b3ebe..ba4d8d6d688 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_indep_blend_enable = - screen->caps.indep_blend_enable; st->has_indep_blend_func = screen->caps.indep_blend_func; st->can_dither = diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index 7dfe624ccec..76adae26966 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_indep_blend_enable; bool has_indep_blend_func; bool can_dither; bool can_bind_const_buffer_as_vertex;