Mesa (staging/21.1): freedreno: Use correct key for binning pass shader
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Aug 10 21:42:11 UTC 2021
Module: Mesa
Branch: staging/21.1
Commit: 342907356d4c487d8586616d7a095eb745de4fef
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=342907356d4c487d8586616d7a095eb745de4fef
Author: Rob Clark <robdclark at chromium.org>
Date: Tue Aug 10 11:24:47 2021 -0700
freedreno: Use correct key for binning pass shader
We updated the key correctly for whether we wanted to use a
safe_constlen binning pass variant, but then passed the wrong
key to ir3_shader_variant().
Fixes: 1dd24bf27b2 ("freedreno: Share constlen between different stages properly")
Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12314>
(cherry picked from commit a79ac1bee14d6600cde2788bf136aa59b69a786f)
---
.pick_status.json | 2 +-
src/gallium/drivers/freedreno/ir3/ir3_cache.c | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 3b2376e257e..a8a49416d63 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -31,7 +31,7 @@
"description": "freedreno: Use correct key for binning pass shader",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "1dd24bf27b2b1da65cf66f58481ec2331179b4e0"
},
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cache.c b/src/gallium/drivers/freedreno/ir3/ir3_cache.c
index b330538d12e..c402b3cd4c6 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_cache.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_cache.c
@@ -140,9 +140,13 @@ ir3_cache_lookup(struct ir3_cache *cache, const struct ir3_cache_key *key,
struct ir3_shader_variant *bs;
if (ir3_has_binning_vs(&key->key)) {
- shader_key.safe_constlen = !!(safe_constlens & (1 << MESA_SHADER_VERTEX));
+ /* starting with a6xx, the same const state is used for binning and draw
+ * passes, so the binning pass VS variant needs to match the main VS
+ */
+ shader_key.safe_constlen = (compiler->gen >= 6) &&
+ !!(safe_constlens & (1 << MESA_SHADER_VERTEX));
bs =
- ir3_shader_variant(shaders[MESA_SHADER_VERTEX], key->key, true, debug);
+ ir3_shader_variant(shaders[MESA_SHADER_VERTEX], shader_key, true, debug);
if (!bs)
return NULL;
} else {
More information about the mesa-commit
mailing list