summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-01-10 13:39:05 -0600
committerJason Ekstrand <[email protected]>2019-03-08 22:03:34 -0600
commit8fdee457a4cb20f4587b5ec817aa1f9325bd5f1c (patch)
treef5b6ab61fc0b52e844e9fbc9fbcdb677d83060b1 /src
parent179d254cbaaa3f4ffcd5f9fef73cb413b7dc0e72 (diff)
anv/pipeline: Move lower_explicit_io much later
Now that nir_opt_copy_prop_vars can properly handle array derefs on vectors, it's safe to move UBO and SSBO lowering to late in the pipeline. This should allow NIR to actually start optimizing SSBO access. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/anv_pipeline.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index dbff784fb10..61edf93cd08 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -218,9 +218,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_ubo | nir_var_mem_ssbo,
- nir_address_format_vk_index_offset);
-
NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_mem_global,
nir_address_format_64bit_global);
@@ -600,6 +597,11 @@ anv_pipeline_lower_nir(struct anv_pipeline *pipeline,
pipeline->device->robust_buffer_access,
layout, nir, prog_data,
&stage->bind_map);
+
+ NIR_PASS_V(nir, nir_lower_explicit_io,
+ nir_var_mem_ubo | nir_var_mem_ssbo,
+ nir_address_format_vk_index_offset);
+
NIR_PASS_V(nir, nir_opt_constant_folding);
}