From 707e72f13bb78869ee95d3286980bf1709cba6cf Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 26 Apr 2016 18:34:19 -0700 Subject: nir: Switch the arguments to nir_foreach_instr This matches the "foreach x in container" pattern found in many other programming languages. Generated by the following regular expression: s/nir_foreach_instr(\([^,]*\),\s*\([^,]*\))/nir_foreach_instr(\2, \1)/ and similar expressions for nir_foreach_instr_safe etc. Reviewed-by: Ian Romanick --- src/intel/vulkan/anv_nir_apply_dynamic_offsets.c | 2 +- src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 4 ++-- src/intel/vulkan/anv_nir_lower_push_constants.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/intel/vulkan') diff --git a/src/intel/vulkan/anv_nir_apply_dynamic_offsets.c b/src/intel/vulkan/anv_nir_apply_dynamic_offsets.c index 996eba1c4ac..545dd3f3b13 100644 --- a/src/intel/vulkan/anv_nir_apply_dynamic_offsets.c +++ b/src/intel/vulkan/anv_nir_apply_dynamic_offsets.c @@ -31,7 +31,7 @@ apply_dynamic_offsets_block(nir_block *block, nir_builder *b, { struct anv_descriptor_set_layout *set_layout; - nir_foreach_instr_safe(block, instr) { + nir_foreach_instr_safe(instr, block) { if (instr->type != nir_instr_type_intrinsic) continue; diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c index dc3f989fcd0..e1fec77adb0 100644 --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c @@ -54,7 +54,7 @@ static void get_used_bindings_block(nir_block *block, struct apply_pipeline_layout_state *state) { - nir_foreach_instr_safe(block, instr) { + nir_foreach_instr_safe(instr, block) { switch (instr->type) { case nir_instr_type_intrinsic: { nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); @@ -212,7 +212,7 @@ static void apply_pipeline_layout_block(nir_block *block, struct apply_pipeline_layout_state *state) { - nir_foreach_instr_safe(block, instr) { + nir_foreach_instr_safe(instr, block) { switch (instr->type) { case nir_instr_type_intrinsic: { nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); diff --git a/src/intel/vulkan/anv_nir_lower_push_constants.c b/src/intel/vulkan/anv_nir_lower_push_constants.c index 2d841009c6f..ea39dc36f4c 100644 --- a/src/intel/vulkan/anv_nir_lower_push_constants.c +++ b/src/intel/vulkan/anv_nir_lower_push_constants.c @@ -31,7 +31,7 @@ anv_nir_lower_push_constants(nir_shader *shader) continue; nir_foreach_block(block, function->impl) { - nir_foreach_instr(block, instr) { + nir_foreach_instr(instr, block) { if (instr->type != nir_instr_type_intrinsic) continue; -- cgit v1.2.3