summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-08-15 14:04:25 -0500
committerJason Ekstrand <[email protected]>2018-08-29 14:04:02 -0500
commitf2d0a2b1100537348d25e445871a66fa90d16131 (patch)
tree14b9fd0e04c85279da81b0c10a6710854eac2221 /src
parent15d39f474b89093507a80813d149c40461b8f355 (diff)
anv/pipeline: Remove dead image loads in lower_input_attacnments
Dead code will get rid of them eventually but it's better if they're just gone so we guarantee they won't trip up later passes. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/anv_nir_lower_input_attachments.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_nir_lower_input_attachments.c b/src/intel/vulkan/anv_nir_lower_input_attachments.c
index 81e5ad53eaa..97e1f48936a 100644
--- a/src/intel/vulkan/anv_nir_lower_input_attachments.c
+++ b/src/intel/vulkan/anv_nir_lower_input_attachments.c
@@ -55,7 +55,7 @@ try_lower_input_load(nir_function_impl *impl, nir_intrinsic_instr *load)
nir_builder b;
nir_builder_init(&b, impl);
- b.cursor = nir_before_instr(&load->instr);
+ b.cursor = nir_instr_remove(&load->instr);
nir_ssa_def *frag_coord = nir_f2i32(&b, load_frag_coord(&b));
nir_ssa_def *offset = nir_ssa_for_src(&b, load->src[1], 2);
@@ -122,7 +122,7 @@ anv_nir_lower_input_attachments(nir_shader *shader)
continue;
nir_foreach_block(block, function->impl) {
- nir_foreach_instr(instr, block) {
+ nir_foreach_instr_safe(instr, block) {
if (instr->type != nir_instr_type_intrinsic)
continue;