OSDN Git Service

gallium/ttn: Fix setup of outputs_written.
authorEric Anholt <eric@anholt.net>
Thu, 20 Dec 2018 16:12:50 +0000 (08:12 -0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 11 Jan 2019 19:19:09 +0000 (19:19 +0000)
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@gmail.com>
(cherry picked from commit 7d7ecfbcbc2236ba76d9ad9dc7c589ce5a6bfa32)

src/gallium/auxiliary/nir/tgsi_to_nir.c

index 0ad274b..4fa36cc 100644 (file)
@@ -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: