st/mesa: don't update atomic, SSBO, UBO and TBO states that have no effect
authorMarek Olšák <marek.olsak@amd.com>
Tue, 2 Aug 2016 16:38:45 +0000 (18:38 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 12 Aug 2016 16:50:01 +0000 (18:50 +0200)
Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/state_tracker/st_atom.c

index dddc5ff8a8b5e640075000d366500cedd996066e..94e012a97c7cd0a3f555b7ce354415fb0f02d417 100644 (file)
@@ -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) {