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: cf3fc79cd0 ("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>
(cherry picked from commit 71d6d1b1ab)
This commit is contained in:
Eric Anholt 2021-04-12 11:47:45 -07:00 committed by Eric Engestrom
parent b0ac2df044
commit 743b02f939
2 changed files with 5 additions and 2 deletions

View file

@ -184,7 +184,7 @@
"description": "nir_to_tgsi: Use ARL instead of UARL in the !native_integers case.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "cf3fc79cd0ab55776bbbabe76237c272ab07133e"
},

View file

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