anv: Move nir_lower_wpos_center after dead variable elimination.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 11 Jan 2017 23:10:48 +0000 (15:10 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 13 Jan 2017 23:00:38 +0000 (15:00 -0800)
commitfed4afc5bba9455e857407e10a4dce79ca8dfe2d
treeaf8ba4897ddbe00ee2769749aa81143ab006f99c
parent99c019e1d41eb72c5ca9e0ae4b263acd6e6c214f
anv: Move nir_lower_wpos_center after dead variable elimination.

When multiple shader stages exist in the same SPIR-V module, we compile
all entry points and their inputs/outputs, then dead code eliminate the
ones not related to the specific entry point later.

nir_lower_wpos_center was being run prior to eliminating those random
other variables, which made it trip up, thinking it found gl_FragCoord
when it actually found something else like gl_PerVertex[3].

Fixes dEQP-VK.spirv_assembly.instruction.graphics.module.same_module.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_pipeline.c