spirv: Skip creating unused variables in SPIR-V >= 1.4
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 12 Jan 2021 19:30:52 +0000 (11:30 -0800)
committerMarge Bot <eric+marge@anholt.net>
Fri, 5 Feb 2021 04:52:46 +0000 (04:52 +0000)
commit0c3fe064215864e7966c8640ad36f173d78cb855
tree026c8491edce28e77b83637c48739cb29d33568f
parente3abbe7a24c0a1927313ce629b0d14a11d7e61c8
spirv: Skip creating unused variables in SPIR-V >= 1.4

Newer versions of SPIR-V require that all the global variables used by
the entry point are declared (in contrast to only I/O in previous
versions), so there's no need to remove dead variables or keep track
of the indirectly used variables.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8456>
src/compiler/spirv/spirv_to_nir.c
src/compiler/spirv/vtn_variables.c