Mesa (master): gallium/ttn: Fix setup of outputs_written.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Dec 26 19:51:15 UTC 2018


Module: Mesa
Branch: master
Commit: 7d7ecfbcbc2236ba76d9ad9dc7c589ce5a6bfa32
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d7ecfbcbc2236ba76d9ad9dc7c589ce5a6bfa32

Author: Eric Anholt <eric at anholt.net>
Date:   Thu Dec 20 08:12:50 2018 -0800

gallium/ttn: Fix setup of outputs_written.

We need a 64-bit value, otherwise we only handle the low 32, and happen to
sign-extend to claim to write all varying slots if VARYING_SLOT_VAR2 was
used.

Fixes: 4d0b2c7aaac3 ("ttn: Update shader->info as we generate code.")
Reviewed-by: Rob Clark <robdclark at gmail.com>

---

 src/gallium/auxiliary/nir/tgsi_to_nir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c
index 9be5b9351d..e1ef7bca7c 100644
--- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
+++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
@@ -375,7 +375,7 @@ ttn_emit_declaration(struct ttn_compile *c)
             c->outputs[idx] = var;
 
             for (int i = 0; i < array_size; i++)
-               b->shader->info.outputs_written |= 1 << (var->data.location + i);
+               b->shader->info.outputs_written |= 1ull << (var->data.location + i);
          }
             break;
          case TGSI_FILE_CONSTANT:




More information about the mesa-commit mailing list