Mesa (master): nir_to_tgsi: Use ARL instead of UARL in the !native_integers case.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 16 22:20:04 UTC 2021


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

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Apr 12 11:47:45 2021 -0700

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 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10194>

---

 src/gallium/auxiliary/nir/nir_to_tgsi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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);
 }
 



More information about the mesa-commit mailing list