summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/state.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index d3b1c72b08d..4043c4f2057 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -391,8 +391,12 @@ _mesa_update_state_locked( struct gl_context *ctx )
GLbitfield new_state = ctx->NewState;
GLbitfield prog_flags = _NEW_PROGRAM;
GLbitfield new_prog_state = 0x0;
+ const GLbitfield computed_states = ~(_NEW_CURRENT_ATTRIB | _NEW_LINE);
- if (new_state == _NEW_CURRENT_ATTRIB)
+ /* we can skip a bunch of state validation checks if the dirty
+ * state matches one or more bits in 'computed_states'.
+ */
+ if ((new_state & computed_states) == 0)
goto out;
if (MESA_VERBOSE & VERBOSE_STATE)