Mesa (staging/20.1): freedreno/a6xx: fixup draw state earlier

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 30 20:07:37 UTC 2020


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

Author: Rob Clark <robdclark at chromium.org>
Date:   Wed Jul 29 10:14:34 2020 -0700

freedreno/a6xx: fixup draw state earlier

`fixup_draw_state()` was updating `ctx->dirty` after it had already been
copied into the emit struct, which had the result that we were not re-
emitting the rast state when primitive_restart changes.

Fixes: 4d8f42c8512 ("freedreno/a6xx: separate rast stateobj for prim restart")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3067
Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6117>
(cherry picked from commit b5558f2d2aa738d90b9e039144ae3ca69bdf92ca)

---

 .pick_status.json                             | 2 +-
 src/gallium/drivers/freedreno/a6xx/fd6_draw.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 518ac3b9302..2f015dd9c15 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -274,7 +274,7 @@
         "description": "freedreno/a6xx: fixup draw state earlier",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "4d8f42c85125fa86008553ddaf48f44498d8bddc"
     },
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
index f8ad3be75c8..5ff42e487e0 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
@@ -208,6 +208,8 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
 	if (!fd6_ctx->prog)
 		return NULL;
 
+	fixup_draw_state(ctx, &emit);
+
 	emit.dirty = ctx->dirty;      /* *after* fixup_shader_state() */
 	emit.bs = fd6_emit_get_prog(&emit)->bs;
 	emit.vs = fd6_emit_get_prog(&emit)->vs;
@@ -297,8 +299,6 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
 		ctx->last.restart_index = restart_index;
 	}
 
-	fixup_draw_state(ctx, &emit);
-
 	fd6_emit_state(ring, &emit);
 
 	/* for debug after a lock up, write a unique counter value



More information about the mesa-commit mailing list