aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2019-05-30 16:55:19 -0700
committerCaio Marcelo de Oliveira Filho <[email protected]>2019-06-05 16:57:09 -0700
commit1aea4cd0d91e755ad4b1bcfaee84f41110ccb5af (patch)
tree39aa1bea33e0fad7cf3cb635a51d3ed8fb7350fc /src/intel
parent4f3c82c72c57acd4800e12ec77ad1b830812072c (diff)
anv/pipeline: Move lowering of nir_var_mem_global later
This let deref optimizations apply to globals before lowering them. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_pipeline.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 75d475e0809..061d5d477a4 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -234,9 +234,6 @@ anv_shader_compile_to_nir(struct anv_device *device,
NIR_PASS_V(nir, nir_remove_dead_variables,
nir_var_shader_in | nir_var_shader_out | nir_var_system_value);
- NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_mem_global,
- nir_address_format_64bit_global);
-
NIR_PASS_V(nir, nir_propagate_invariant);
NIR_PASS_V(nir, nir_lower_io_to_temporaries,
nir_shader_get_entrypoint(nir), true, false);
@@ -619,6 +616,9 @@ anv_pipeline_lower_nir(struct anv_pipeline *pipeline,
NIR_PASS_V(nir, brw_nir_lower_image_load_store, compiler->devinfo);
+ NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_mem_global,
+ nir_address_format_64bit_global);
+
/* Apply the actual pipeline layout to UBOs, SSBOs, and textures */
if (layout) {
anv_nir_apply_pipeline_layout(pdevice,