diff options
author | Connor Abbott <cwabbott0@gmail.com> | 2016-04-12 23:59:06 -0400 |
---|---|---|
committer | Jason Ekstrand <jason.ekstrand@intel.com> | 2016-05-05 16:19:41 -0700 |
commit | 7c36f9eb52ead4cb5cd0f81d1f282e0568223ca3 (patch) | |
tree | fd2461be5cd2b76441d2585006b722f18d3af4fa /src/gallium/drivers/vc4/vc4_program.c | |
parent | 582815d9ea053aafb00ad1ceaa1292fec21a4393 (diff) | |
download | external_mesa3d-7c36f9eb52ead4cb5cd0f81d1f282e0568223ca3.zip external_mesa3d-7c36f9eb52ead4cb5cd0f81d1f282e0568223ca3.tar.gz external_mesa3d-7c36f9eb52ead4cb5cd0f81d1f282e0568223ca3.tar.bz2 |
vc4: fixup for new nir_foreach_block()
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_program.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_program.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 598fb0b..34420aa 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -1737,16 +1737,6 @@ static const nir_shader_compiler_options nir_options = { .lower_negate = true, }; -static bool -count_nir_instrs_in_block(nir_block *block, void *state) -{ - int *count = (int *) state; - nir_foreach_instr(instr, block) { - *count = *count + 1; - } - return true; -} - static int count_nir_instrs(nir_shader *nir) { @@ -1754,7 +1744,10 @@ count_nir_instrs(nir_shader *nir) nir_foreach_function(function, nir) { if (!function->impl) continue; - nir_foreach_block_call(function->impl, count_nir_instrs_in_block, &count); + nir_foreach_block(block, function->impl) { + nir_foreach_instr(instr, block) + count++; + } } return count; } |