[Mesa-stable] [PATCH 04/11] anv/pipeline: Do invariance propagation on SPIR-V shaders

Jason Ekstrand jason at jlekstrand.net
Fri Jun 17 20:53:21 UTC 2016


Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
Cc: "12.0" <mesa-stable at lists.freedesktop.org>
Cc: Kenneth Graunke <kenneth at whitecape.org>
---
 src/intel/vulkan/anv_pipeline.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index b41e11e..1c54081 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -165,6 +165,9 @@ anv_shader_compile_to_nir(struct anv_device *device,
       nir_remove_dead_variables(nir, nir_var_system_value);
       nir_validate_shader(nir);
 
+      nir_propagate_invariant(nir);
+      nir_validate_shader(nir);
+
       nir_lower_io_to_temporaries(entry_point->shader, entry_point, true, false);
 
       nir_lower_system_values(nir);
-- 
2.5.0.400.gff86faf



More information about the mesa-stable mailing list