summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4
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/gallium/drivers/vc4
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/gallium/drivers/vc4')
-rw-r--r--src/gallium/drivers/vc4/vc4_nir_lower_blend.c2
-rw-r--r--src/gallium/drivers/vc4/vc4_nir_lower_io.c2
-rw-r--r--src/gallium/drivers/vc4/vc4_nir_lower_txf_ms.c2
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c4
4 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/vc4/vc4_nir_lower_blend.c b/src/gallium/drivers/vc4/vc4_nir_lower_blend.c
index 99cbf30863a..05bac1e311f 100644
--- a/src/gallium/drivers/vc4/vc4_nir_lower_blend.c
+++ b/src/gallium/drivers/vc4/vc4_nir_lower_blend.c
@@ -678,7 +678,7 @@ vc4_nir_lower_blend_block(nir_block *block, void *state)
{
struct vc4_compile *c = state;
- nir_foreach_instr_safe(block, instr) {
+ nir_foreach_instr_safe(instr, block) {
if (instr->type != nir_instr_type_intrinsic)
continue;
nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);
diff --git a/src/gallium/drivers/vc4/vc4_nir_lower_io.c b/src/gallium/drivers/vc4/vc4_nir_lower_io.c
index f1e5478126e..6f8e162fdd3 100644
--- a/src/gallium/drivers/vc4/vc4_nir_lower_io.c
+++ b/src/gallium/drivers/vc4/vc4_nir_lower_io.c
@@ -437,7 +437,7 @@ vc4_nir_lower_io_block(nir_block *block, void *arg)
nir_builder b;
nir_builder_init(&b, impl);
- nir_foreach_instr_safe(block, instr)
+ nir_foreach_instr_safe(instr, block)
vc4_nir_lower_io_instr(c, &b, instr);
return true;
diff --git a/src/gallium/drivers/vc4/vc4_nir_lower_txf_ms.c b/src/gallium/drivers/vc4/vc4_nir_lower_txf_ms.c
index 0e7b2d5e25e..8069ca95f3f 100644
--- a/src/gallium/drivers/vc4/vc4_nir_lower_txf_ms.c
+++ b/src/gallium/drivers/vc4/vc4_nir_lower_txf_ms.c
@@ -139,7 +139,7 @@ vc4_nir_lower_txf_ms_block(nir_block *block, void *arg)
nir_builder b;
nir_builder_init(&b, impl);
- nir_foreach_instr_safe(block, instr) {
+ nir_foreach_instr_safe(instr, block) {
if (instr->type == nir_instr_type_tex) {
vc4_nir_lower_txf_ms_instr(c, &b,
nir_instr_as_tex(instr));
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 4f6023334cf..58e78b8ed76 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1694,7 +1694,7 @@ ntq_emit_instr(struct vc4_compile *c, nir_instr *instr)
static void
ntq_emit_block(struct vc4_compile *c, nir_block *block)
{
- nir_foreach_instr(block, instr) {
+ nir_foreach_instr(instr, block) {
ntq_emit_instr(c, instr);
}
}
@@ -1781,7 +1781,7 @@ static bool
count_nir_instrs_in_block(nir_block *block, void *state)
{
int *count = (int *) state;
- nir_foreach_instr(block, instr) {
+ nir_foreach_instr(instr, block) {
*count = *count + 1;
}
return true;