summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-04-26 18:34:19 -0700
committerJason Ekstrand <[email protected]>2016-04-28 15:54:48 -0700
commit707e72f13bb78869ee95d3286980bf1709cba6cf (patch)
tree351ee47ca2ac2b54fb7ef0e8effa65a6e81b2c80 /src/intel
parent261d62de33b6192ec31f034a9897d034a37fa582 (diff)
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 <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_nir_apply_dynamic_offsets.c2
-rw-r--r--src/intel/vulkan/anv_nir_apply_pipeline_layout.c4
-rw-r--r--src/intel/vulkan/anv_nir_lower_push_constants.c2
3 files changed, 4 insertions, 4 deletions
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;