r600/sfn: Set minimum required registers based on array allocation
authorGert Wollny <gert.wollny@collabora.com>
Thu, 29 Dec 2022 10:56:38 +0000 (11:56 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 2 Jan 2023 14:31:35 +0000 (14:31 +0000)
commit9fd9f3cd10cf58549f850aeca9103d8cca5a5f81
treeec82b78cb06ffc592005b1656ab7a960eb937304
parent8348c9c84d7d9fcf4d499b5df92e7538955c1755
r600/sfn: Set minimum required registers based on array allocation

In the rare case that after register allocation the highest directly
accessed register index is below the highest value used for an
indirectly accessed array we have to ensure that the shader allocates
enough registers to account for these indices that are not seen by the
assembler.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7966
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20451>
src/gallium/drivers/r600/sfn/sfn_nir.cpp
src/gallium/drivers/r600/sfn/sfn_shader.cpp
src/gallium/drivers/r600/sfn/sfn_shader.h