diff options
author | Jason Ekstrand <[email protected]> | 2016-04-26 20:26:42 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-04-28 15:54:48 -0700 |
commit | 9464d8c49813aba77285e7465b96e92a91ed327c (patch) | |
tree | e39fa6395b6e5fd1eba81fb1520cf047c91cd5f2 /src/gallium/drivers/vc4 | |
parent | e63766fb4b54bc88756ee7e82c3ff8cec0dc5561 (diff) |
nir: Switch the arguments to nir_foreach_function
This matches the "foreach x in container" pattern found in many other
programming languages. Generated by the following regular expression:
s/nir_foreach_function(\([^,]*\),\s*\([^,]*\))/nir_foreach_function(\2, \1)/
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/gallium/drivers/vc4')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_nir_lower_blend.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/vc4/vc4_nir_lower_io.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/vc4/vc4_nir_lower_txf_ms.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/vc4/vc4_program.c | 4 |
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 05bac1e311f..c61612213e7 100644 --- a/src/gallium/drivers/vc4/vc4_nir_lower_blend.c +++ b/src/gallium/drivers/vc4/vc4_nir_lower_blend.c @@ -712,7 +712,7 @@ vc4_nir_lower_blend_block(nir_block *block, void *state) void vc4_nir_lower_blend(nir_shader *s, struct vc4_compile *c) { - nir_foreach_function(s, function) { + nir_foreach_function(function, s) { if (function->impl) { nir_foreach_block_call(function->impl, vc4_nir_lower_blend_block, c); diff --git a/src/gallium/drivers/vc4/vc4_nir_lower_io.c b/src/gallium/drivers/vc4/vc4_nir_lower_io.c index 6f8e162fdd3..3598268cd98 100644 --- a/src/gallium/drivers/vc4/vc4_nir_lower_io.c +++ b/src/gallium/drivers/vc4/vc4_nir_lower_io.c @@ -457,7 +457,7 @@ vc4_nir_lower_io_impl(struct vc4_compile *c, nir_function_impl *impl) void vc4_nir_lower_io(nir_shader *s, struct vc4_compile *c) { - nir_foreach_function(s, function) { + nir_foreach_function(function, s) { if (function->impl) vc4_nir_lower_io_impl(c, function->impl); } 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 8069ca95f3f..958a06af8dc 100644 --- a/src/gallium/drivers/vc4/vc4_nir_lower_txf_ms.c +++ b/src/gallium/drivers/vc4/vc4_nir_lower_txf_ms.c @@ -164,7 +164,7 @@ vc4_nir_lower_txf_ms_impl(struct vc4_compile *c, nir_function_impl *impl) void vc4_nir_lower_txf_ms(nir_shader *s, struct vc4_compile *c) { - nir_foreach_function(s, function) { + nir_foreach_function(function, s) { if (function->impl) vc4_nir_lower_txf_ms_impl(c, function->impl); } diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 58e78b8ed76..b1c8b009ffc 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -1759,7 +1759,7 @@ nir_to_qir(struct vc4_compile *c) ntq_setup_registers(c, &c->s->registers); /* Find the main function and emit the body. */ - nir_foreach_function(c->s, function) { + nir_foreach_function(function, c->s) { assert(strcmp(function->name, "main") == 0); assert(function->impl); ntq_emit_impl(c, function->impl); @@ -1791,7 +1791,7 @@ static int count_nir_instrs(nir_shader *nir) { int count = 0; - nir_foreach_function(nir, function) { + nir_foreach_function(function, nir) { if (!function->impl) continue; nir_foreach_block_call(function->impl, count_nir_instrs_in_block, &count); |