zink: do not leave needless shader temps around
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 8 Dec 2022 12:13:33 +0000 (13:13 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 9 Dec 2022 12:47:26 +0000 (12:47 +0000)
commit597b2648d2dbe4dff21c7eeb95729c02d8e5e01d
tree00388af3e9ff32dc6c45642f11ffe430719f3c59
parent8c2448d4e67a19647afc7785fb31be6f7a6f094c
zink: do not leave needless shader temps around

This used to not matter, but since we started emitting shader-temps
properly, this causes issues where we end up with samplers and images as
shader-temps. That causes asserts while emitting them.

So let's remove the unused vars as well.

This fixes a piglit regression that somehow went unnoticed on CI.

Fixes: 85964945e7c ("zink: emit vars with nir_var_shader_temp mode")
Tested-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20227>
src/gallium/drivers/zink/zink_compiler.c