summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_pipeline.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-03-22 22:11:23 -0700
committerJason Ekstrand <[email protected]>2018-06-22 20:54:00 -0700
commit5cd7324a57a0c6dc2ecffef236e6efd778cb78aa (patch)
tree0cfbb63c9ac5d3544cf2a2effd36f7876142047d /src/intel/vulkan/anv_pipeline.c
parent1d59034de2c8cc03b0788c8d0644f3b4d0daa8c7 (diff)
anv/pipeline: Do less deref instruction lowering
This commit removes most of the deref instruction lowering. Instead of lowering early, we only lower textures and images and we only do so right before any of the anv image lowering passes. Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_pipeline.c')
-rw-r--r--src/intel/vulkan/anv_pipeline.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 16dcda9fc61..00bd49d7eb4 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -190,8 +190,6 @@ anv_shader_compile_to_nir(struct anv_pipeline *pipeline,
assert(exec_list_length(&nir->functions) == 1);
entry_point->name = ralloc_strdup(entry_point, "main");
- NIR_PASS_V(nir, nir_lower_deref_instrs, ~0);
-
/* Now that we've deleted all but the main function, we can go ahead and
* lower the rest of the constant initializers. We do this here so that
* nir_remove_dead_variables and split_per_member_structs below see the
@@ -220,6 +218,9 @@ anv_shader_compile_to_nir(struct anv_pipeline *pipeline,
nir = brw_preprocess_nir(compiler, nir);
+ NIR_PASS_V(nir, nir_lower_deref_instrs,
+ nir_lower_texture_derefs | nir_lower_image_derefs);
+
if (stage == MESA_SHADER_FRAGMENT)
NIR_PASS_V(nir, anv_nir_lower_input_attachments);