summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_to_source_mods.c
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2016-04-08 16:18:55 -0400
committerJason Ekstrand <jason.ekstrand@intel.com>2016-04-28 15:52:17 -0700
commit2febb88e6d11837b2057c98f5bc191bc1ae74817 (patch)
tree58345d4f9a26233723b6e0c622b5a6d07f71b818 /src/compiler/nir/nir_lower_to_source_mods.c
parentc81ca60b41db4632237dc5facfe4e37e500a840a (diff)
downloadexternal_mesa3d-2febb88e6d11837b2057c98f5bc191bc1ae74817.tar.gz
external_mesa3d-2febb88e6d11837b2057c98f5bc191bc1ae74817.tar.bz2
external_mesa3d-2febb88e6d11837b2057c98f5bc191bc1ae74817.zip
nir/lower_to_source_mods: fixup for new foreeach_block()
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/compiler/nir/nir_lower_to_source_mods.c')
-rw-r--r--src/compiler/nir/nir_lower_to_source_mods.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/compiler/nir/nir_lower_to_source_mods.c b/src/compiler/nir/nir_lower_to_source_mods.c
index 369570ed68..b641908eb4 100644
--- a/src/compiler/nir/nir_lower_to_source_mods.c
+++ b/src/compiler/nir/nir_lower_to_source_mods.c
@@ -34,7 +34,7 @@
*/
static bool
-nir_lower_to_source_mods_block(nir_block *block, void *state)
+nir_lower_to_source_mods_block(nir_block *block)
{
nir_foreach_instr(block, instr) {
if (instr->type != nir_instr_type_alu)
@@ -181,17 +181,14 @@ nir_lower_to_source_mods_block(nir_block *block, void *state)
return true;
}
-static void
-nir_lower_to_source_mods_impl(nir_function_impl *impl)
-{
- nir_foreach_block_call(impl, nir_lower_to_source_mods_block, NULL);
-}
-
void
nir_lower_to_source_mods(nir_shader *shader)
{
nir_foreach_function(shader, function) {
- if (function->impl)
- nir_lower_to_source_mods_impl(function->impl);
+ if (function->impl) {
+ nir_foreach_block(block, function->impl) {
+ nir_lower_to_source_mods_block(block);
+ }
+ }
}
}