diff options
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 598fb0bd3ba..34420aaa975 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; } |