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: 1dd24bf27b ("freedreno: Share constlen between different stages properly")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12314>
This commit is contained in:
Rob Clark 2021-08-10 11:24:47 -07:00 committed by Marge Bot
parent 9b57a81815
commit a79ac1bee1
1 changed files with 6 additions and 2 deletions

View File

@ -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 {