summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-10-02 09:53:50 -0700
committerEmil Velikov <[email protected]>2017-10-27 18:55:38 +0100
commit2e33d680461c8a8d72c0841ff96b69899c08a551 (patch)
tree9227572ed2a6375a233e4f628d6e5e355234c9ef
parent3b699fdd199da2b82fd75eb7d50ab18de70f1acf (diff)
anv/pipeline: Call nir_lower_system_valaues after brw_preprocess_nir
We currently have a bug where nir_lower_system_values gets called before nir_lower_var_copies so it will miss any system value uses which come from a copy_var intrinsic. Moving it to after brw_preprocess_nir fixes this problem. Reviewed-by: Lionel Landwerlin <[email protected]> Cc: [email protected] (cherry picked from commit 279f8fb69cf68d05287e14f60cf67fc025643bc4)
-rw-r--r--src/intel/vulkan/anv_pipeline.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 6a0fed35843..b903b4fde6d 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -173,13 +173,14 @@ anv_shader_compile_to_nir(struct anv_pipeline *pipeline,
NIR_PASS_V(nir, nir_propagate_invariant);
NIR_PASS_V(nir, nir_lower_io_to_temporaries,
entry_point->impl, true, false);
- NIR_PASS_V(nir, nir_lower_system_values);
/* Vulkan uses the separate-shader linking model */
nir->info.separate_shader = true;
nir = brw_preprocess_nir(compiler, nir);
+ NIR_PASS_V(nir, nir_lower_system_values);
+
if (stage == MESA_SHADER_FRAGMENT)
NIR_PASS_V(nir, anv_nir_lower_input_attachments);