summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2021-04-12 11:47:45 -0700
committerMarge Bot <eric+marge@anholt.net>2021-04-16 21:58:00 +0000
commit71d6d1b1ab917cff0f2f442391964e0ea8fc222b (patch)
tree060c209191f8eb5b969c19dae466292a9b56284a
parent5b9c3cb7b9daeae04c1211c4124038fc2327ad94 (diff)
nir_to_tgsi: Use ARL instead of UARL in the !native_integers case.
Our "integer" index is stored as a float in this case, and we just need to use teh right opcode for loading it, which will be the only one supported by !native_integers hardware. Fixes: cf3fc79cd0ab ("st/mesa: Replace mesa_to_tgsi() with prog_to_nir() and nir_to_tgsi().") Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10194>
-rw-r--r--src/gallium/auxiliary/nir/nir_to_tgsi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi.c b/src/gallium/auxiliary/nir/nir_to_tgsi.c
index 7cc163c7703..d0307a690c0 100644
--- a/src/gallium/auxiliary/nir/nir_to_tgsi.c
+++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c
@@ -476,7 +476,10 @@ ntt_reladdr(struct ntt_compile *c, struct ureg_src addr)
c->addr_declared[c->next_addr_reg] = true;
}
- ureg_UARL(c->ureg, c->addr_reg[c->next_addr_reg], addr);
+ if (c->native_integers)
+ ureg_UARL(c->ureg, c->addr_reg[c->next_addr_reg], addr);
+ else
+ ureg_ARL(c->ureg, c->addr_reg[c->next_addr_reg], addr);
return ureg_scalar(ureg_src(c->addr_reg[c->next_addr_reg++]), 0);
}