summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/ir3
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-04-26 20:26:42 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-04-28 15:54:48 -0700
commit9464d8c49813aba77285e7465b96e92a91ed327c (patch)
treee39fa6395b6e5fd1eba81fb1520cf047c91cd5f2 /src/gallium/drivers/freedreno/ir3
parente63766fb4b54bc88756ee7e82c3ff8cec0dc5561 (diff)
downloadexternal_mesa3d-9464d8c49813aba77285e7465b96e92a91ed327c.tar.gz
external_mesa3d-9464d8c49813aba77285e7465b96e92a91ed327c.tar.bz2
external_mesa3d-9464d8c49813aba77285e7465b96e92a91ed327c.zip
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 <ian.d.romanick@intel.com>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c2
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_nir_lower_if_else.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
index 9bac664f7a..6b7bb9f1df 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
@@ -2157,7 +2157,7 @@ emit_instructions(struct ir3_compile *ctx)
nir_function_impl *fxn = NULL;
/* Find the main function: */
- nir_foreach_function(ctx->s, function) {
+ nir_foreach_function(function, ctx->s) {
compile_assert(ctx, strcmp(function->name, "main") == 0);
compile_assert(ctx, function->impl);
fxn = function->impl;
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir_lower_if_else.c b/src/gallium/drivers/freedreno/ir3/ir3_nir_lower_if_else.c
index f8a1a57d0f..f24a58da12 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_nir_lower_if_else.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_nir_lower_if_else.c
@@ -328,7 +328,7 @@ ir3_nir_lower_if_else(nir_shader *shader)
{
bool progress = false;
- nir_foreach_function(shader, function) {
+ nir_foreach_function(function, shader) {
if (function->impl)
progress |= lower_if_else_impl(function->impl);
}