spirv: Count variables *after* unused ones are removed
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 12 Jan 2021 18:25:58 +0000 (10:25 -0800)
committerMarge Bot <eric+marge@anholt.net>
Fri, 5 Feb 2021 04:52:46 +0000 (04:52 +0000)
commite3abbe7a24c0a1927313ce629b0d14a11d7e61c8
tree5b36e18030e8ebd7e2759faadcfc50ee8fa47d96
parentcc98ba2eaf29cea084a5756ff851057f3513e555
spirv: Count variables *after* unused ones are removed

Previous code was counting more variables than those used by the entry
point.

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