[Mesa-dev] [PATCH] gallium/ttn: fix for arrays vs regs

Rob Clark robdclark at gmail.com
Mon Apr 6 09:46:29 PDT 2015


From: Rob Clark <robclark at freedesktop.org>

Just because there is array access, doesn't mean everything is an array.

Signed-off-by: Rob Clark <robclark at freedesktop.org>
---
 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 da935a4..57a7b03 100644
--- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
+++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
@@ -121,7 +121,7 @@ ttn_emit_declaration(struct ttn_compile *c)
 
    if (file == TGSI_FILE_TEMPORARY) {
       nir_register *reg;
-      if (c->scan->indirect_files & (1 << file)) {
+      if (decl->Declaration.Array) {
          reg = nir_local_reg_create(b->impl);
          reg->num_components = 4;
          reg->num_array_elems = array_size;
-- 
2.1.0



More information about the mesa-dev mailing list