From ff571df163a72cd130b321f62aa5ccf525042fff Mon Sep 17 00:00:00 2001 From: Vishnu Vardan Date: Sun, 26 Apr 2026 00:53:52 -0400 Subject: [PATCH] mesa/st: remove validate_all_dirty_states from st_context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit validate_all_dirty_states is a direct copy of screen->caps.validate_all_dirty_states. Read the cap from the screen directly. Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/state.c | 2 +- src/mesa/state_tracker/st_context.c | 4 ---- src/mesa/state_tracker/st_context.h | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 78ae51f29ee..e716502dac4 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -455,7 +455,7 @@ update_program(struct gl_context *ctx) _mesa_set_active_states(ctx); /* Some drivers need to clean up previous states too */ - if (st->validate_all_dirty_states) + if (st->screen->caps.validate_all_dirty_states) ST_SET_STATES(st->active_states, dirty); return _NEW_PROGRAM; diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 1e48159e80c..3a7e9623203 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -594,10 +594,6 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe, st->has_hw_atomics = screen->shader_caps[MESA_SHADER_FRAGMENT].max_hw_atomic_counters ? true : false; - - st->validate_all_dirty_states = - screen->caps.validate_all_dirty_states - ? true : false; st->can_null_texture = screen->caps.null_textures ? true : false; diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index 3fd15f4ad60..236ce9ee4f1 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -176,7 +176,6 @@ struct st_context bool draw_needs_minmax_index; bool has_hw_atomics; - bool validate_all_dirty_states; bool can_null_texture; bool is_threaded_context;