summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-08-02 18:38:45 +0200
committerMarek Olšák <[email protected]>2016-08-12 18:50:01 +0200
commit085aa7f91e82dfeb08dd6fb0655df3e229816db3 (patch)
treed1249f2f2d549d2a2fd32373a2398a257ff7402d /src/mesa/state_tracker/st_atom.c
parentac032d800e5f4cb3ab9166187150a93c17a508aa (diff)
st/mesa: don't update atomic, SSBO, UBO and TBO states that have no effect
Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_atom.c')
-rw-r--r--src/mesa/state_tracker/st_atom.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index dddc5ff8a8b..94e012a97c7 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -157,9 +157,12 @@ void st_validate_state( struct st_context *st, enum st_pipeline pipeline )
uint64_t dirty, pipeline_mask;
uint32_t dirty_lo, dirty_hi;
- /* Get Mesa driver state. */
- st->dirty |= st->ctx->NewDriverState & ST_ALL_STATES_MASK;
- st->ctx->NewDriverState = 0;
+ /* Get Mesa driver state.
+ *
+ * Inactive states are shader states not used by shaders at the moment.
+ */
+ st->dirty |= ctx->NewDriverState & st->active_states & ST_ALL_STATES_MASK;
+ ctx->NewDriverState = 0;
/* Get pipeline state. */
switch (pipeline) {