nir_to_tgsi: Allocate the primid sysval to num_inputs, not num_outputs.
authorEmma Anholt <emma@anholt.net>
Mon, 14 Feb 2022 04:33:13 +0000 (20:33 -0800)
committerMarge Bot <emma+marge@anholt.net>
Tue, 19 Apr 2022 20:05:41 +0000 (20:05 +0000)
commit73e1a54623ab4de4b1a359ee4e456960de4a9fe1
treecb5697ed24b6139bc3ef86262eca0dbd301047bc
parentfc963972565adf78e56f74447c5cd5fcb61dd866
nir_to_tgsi: Allocate the primid sysval to num_inputs, not num_outputs.

r600 would end up looking for it past the end of its array of inputs
(which expected 1:1 ordering from declarations to driver locations).

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16043>
src/gallium/auxiliary/nir/nir_to_tgsi.c