Mesa (staging/20.1): st/mesa: do not clear NewDriverState for inactive states

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 1 11:19:40 UTC 2020


Module: Mesa
Branch: staging/20.1
Commit: 8a413ea1e95613d28c6506c25dee4491d626d156
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8a413ea1e95613d28c6506c25dee4491d626d156

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Thu Jun 25 17:12:57 2020 +0200

st/mesa: do not clear NewDriverState for inactive states

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 at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5660>
(cherry picked from commit 5f1a16d06d8b2cf6942b1e4b250842ec0be2c8a4)

---

 .pick_status.json                | 2 +-
 src/mesa/state_tracker/st_atom.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 901f6ee70ec..6b7874052a7 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -13,7 +13,7 @@
         "description": "st/mesa: do not clear NewDriverState for inactive states",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "085aa7f91e82dfeb08dd6fb0655df3e229816db3"
     },
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index 11b0ce6ec55..181134a2207 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -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) {



More information about the mesa-commit mailing list