nir/lower_alu_to_scalar: fixup for new foreach_block()
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:

committed by
Jason Ekstrand

parent
4179a56f42
commit
e36fbcfc3f
@@ -240,24 +240,18 @@ lower_alu_instr_scalar(nir_alu_instr *instr, nir_builder *b)
|
|||||||
nir_instr_remove(&instr->instr);
|
nir_instr_remove(&instr->instr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
lower_alu_to_scalar_block(nir_block *block, void *builder)
|
|
||||||
{
|
|
||||||
nir_foreach_instr_safe(block, instr) {
|
|
||||||
if (instr->type == nir_instr_type_alu)
|
|
||||||
lower_alu_instr_scalar(nir_instr_as_alu(instr), builder);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nir_lower_alu_to_scalar_impl(nir_function_impl *impl)
|
nir_lower_alu_to_scalar_impl(nir_function_impl *impl)
|
||||||
{
|
{
|
||||||
nir_builder builder;
|
nir_builder builder;
|
||||||
nir_builder_init(&builder, impl);
|
nir_builder_init(&builder, impl);
|
||||||
|
|
||||||
nir_foreach_block_call(impl, lower_alu_to_scalar_block, &builder);
|
nir_foreach_block(block, impl) {
|
||||||
|
nir_foreach_instr_safe(block, instr) {
|
||||||
|
if (instr->type == nir_instr_type_alu)
|
||||||
|
lower_alu_instr_scalar(nir_instr_as_alu(instr), &builder);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Reference in New Issue
Block a user