From 743b02f9394869da4f1f9ce2f43f190e3846044b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 12 Apr 2021 11:47:45 -0700 Subject: [PATCH] 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 Part-of: (cherry picked from commit 71d6d1b1ab917cff0f2f442391964e0ea8fc222b) --- .pick_status.json | 2 +- src/gallium/auxiliary/nir/nir_to_tgsi.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 5b227a0e746..885d41112b7 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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" }, 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); }