anv/pipeline: lower constant initializers on output variables earlier
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 16 Jan 2018 08:37:11 +0000 (09:37 +0100)
committerIago Toral Quiroga <itoral@igalia.com>
Tue, 30 Jan 2018 07:10:29 +0000 (08:10 +0100)
commit99b57daf4a8289430728bec69f7dadfab457d990
treefb5dc92065e8bdeabe74b70f02cc8329b081394c
parent6316c2ecbda6d9370f1f876981ebcc35393c04e8
anv/pipeline: lower constant initializers on output variables earlier

If a shader only writes to an output via a constant initializer we
need to lower it before we call nir_remove_dead_variables so that
this pass sees the stores from the initializer and doesn't kill the
output.

Fixes test failures in new work-in-progress CTS tests:
dEQP-VK.spirv_assembly.instruction.graphics.variable_init.output_vert
dEQP-VK.spirv_assembly.instruction.graphics.variable_init.output_frag

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_pipeline.c