nv50/ir/nir: convert to 32 bit for all OP_SET opcodes
authorDanilo Krummrich <dakr@redhat.com>
Mon, 1 Aug 2022 12:42:27 +0000 (14:42 +0200)
committerDanilo Krummrich <dakr@redhat.com>
Fri, 9 Sep 2022 15:32:05 +0000 (17:32 +0200)
commit6e2fda15f14d95ead492245698f430b6708329f0
tree0a8fdb5c7de4136089d1398449b7ce6aba574350
parentcd53bcd325dfbdbe46d53ead897ef2e8d1083da4
nv50/ir/nir: convert to 32 bit for all OP_SET opcodes

The 'set' instruction does distinguish between signed and unsigned, but
always treats values as 32 bit. For singed values < 0 with a bit width
smaller than 32 bit this falsely results in treating it as a positive
value.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18109>
src/nouveau/codegen/nv50_ir_from_nir.cpp