st/mesa: do not clear NewDriverState for inactive states
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 25 Jun 2020 15:12:57 +0000 (17:12 +0200)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Wed, 1 Jul 2020 07:44:59 +0000 (09:44 +0200)
Fixes: 085aa7f91e8 ("st/mesa: don't update atomic, SSBO, UBO and TBO states that have no effect")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2951
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5660>

src/mesa/state_tracker/st_atom.c

index 11b0ce6ec55519b425ad6bc33abdcd2229cd28ef..181134a2207f9b5bec274431c64ee662b72f036d 100644 (file)
@@ -181,7 +181,7 @@ void st_validate_state( struct st_context *st, enum st_pipeline pipeline )
     * 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;
+   ctx->NewDriverState &= ~st->dirty;
 
    /* Get pipeline state. */
    switch (pipeline) {