glsl: remove dead varyings before assigning attr locations
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 7 Jul 2023 05:20:42 +0000 (15:20 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 10 Jul 2023 02:47:59 +0000 (12:47 +1000)
commit9cbdf5c9e5a0e940810217e9c0c10245fa1d9aae
tree2e5a0e5b38644c96bdb37520e44686b919c51a96
parent689f38b2b452a8b8bad5ab9388c7f71ff9074cec
glsl: remove dead varyings before assigning attr locations

The GLSL IR code used to clean these up. Some apps such as the Heaven
benchmark fail linking if we don't eliminate them before the linker
validation.

Fixes: a8534c7b4cfc ("glsl: drop the dce of global vars from GLSL IR linker")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9319

Tested-by: Marcus Seyfarth <m.seyfarth@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24035>
src/compiler/glsl/gl_nir_linker.c
src/gallium/drivers/d3d12/ci/d3d12-quick_gl.txt