diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2016-04-26 20:26:42 -0700 |
---|---|---|
committer | Jason Ekstrand <jason.ekstrand@intel.com> | 2016-04-28 15:54:48 -0700 |
commit | 9464d8c49813aba77285e7465b96e92a91ed327c (patch) | |
tree | e39fa6395b6e5fd1eba81fb1520cf047c91cd5f2 /src/mesa/drivers/dri/i965/brw_nir.c | |
parent | e63766fb4b54bc88756ee7e82c3ff8cec0dc5561 (diff) | |
download | external_mesa3d-9464d8c49813aba77285e7465b96e92a91ed327c.zip external_mesa3d-9464d8c49813aba77285e7465b96e92a91ed327c.tar.gz external_mesa3d-9464d8c49813aba77285e7465b96e92a91ed327c.tar.bz2 |
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/mesa/drivers/dri/i965/brw_nir.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_nir.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c index 7ee2a8f..5475276 100644 --- a/src/mesa/drivers/dri/i965/brw_nir.c +++ b/src/mesa/drivers/dri/i965/brw_nir.c @@ -84,7 +84,7 @@ add_const_offset_to_base_block(nir_block *block, nir_builder *b, static void add_const_offset_to_base(nir_shader *nir, nir_variable_mode mode) { - nir_foreach_function(nir, f) { + nir_foreach_function(f, nir) { if (f->impl) { nir_builder b; nir_builder_init(&b, f->impl); @@ -222,7 +222,7 @@ brw_nir_lower_vs_inputs(nir_shader *nir, */ GLbitfield64 inputs_read = nir->info.inputs_read; - nir_foreach_function(nir, function) { + nir_foreach_function(function, nir) { if (function->impl) { nir_foreach_block(block, function->impl) { remap_vs_attrs(block, inputs_read); @@ -249,7 +249,7 @@ brw_nir_lower_vue_inputs(nir_shader *nir, bool is_scalar, add_const_offset_to_base(nir, nir_var_shader_in); - nir_foreach_function(nir, function) { + nir_foreach_function(function, nir) { if (function->impl) { nir_foreach_block(block, function->impl) { remap_inputs_with_vue_map(block, vue_map); @@ -273,7 +273,7 @@ brw_nir_lower_tes_inputs(nir_shader *nir, const struct brw_vue_map *vue_map) add_const_offset_to_base(nir, nir_var_shader_in); - nir_foreach_function(nir, function) { + nir_foreach_function(function, nir) { if (function->impl) { nir_builder b; nir_builder_init(&b, function->impl); @@ -320,7 +320,7 @@ brw_nir_lower_tcs_outputs(nir_shader *nir, const struct brw_vue_map *vue_map) add_const_offset_to_base(nir, nir_var_shader_out); - nir_foreach_function(nir, function) { + nir_foreach_function(function, nir) { if (function->impl) { nir_builder b; nir_builder_init(&b, function->impl); @@ -501,7 +501,7 @@ brw_postprocess_nir(nir_shader *nir, if (unlikely(debug_enabled)) { /* Re-index SSA defs so we print more sensible numbers. */ - nir_foreach_function(nir, function) { + nir_foreach_function(function, nir) { if (function->impl) nir_index_ssa_defs(function->impl); } |