X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fvc4%2Fvc4_nir_lower_blend.c;h=8cad4b717e3e7b47d81a56a660207ab91846f619;hb=7c5eda6f4e0801b97aa8b6c87a82c33e1d1202c5;hp=05bac1e311f39fe7839007d386cda87ffa7f9dda;hpb=707e72f13bb78869ee95d3286980bf1709cba6cf;p=mesa.git diff --git a/src/gallium/drivers/vc4/vc4_nir_lower_blend.c b/src/gallium/drivers/vc4/vc4_nir_lower_blend.c index 05bac1e311f..8cad4b717e3 100644 --- a/src/gallium/drivers/vc4/vc4_nir_lower_blend.c +++ b/src/gallium/drivers/vc4/vc4_nir_lower_blend.c @@ -674,10 +674,8 @@ vc4_nir_lower_blend_instr(struct vc4_compile *c, nir_builder *b, } static bool -vc4_nir_lower_blend_block(nir_block *block, void *state) +vc4_nir_lower_blend_block(nir_block *block, struct vc4_compile *c) { - struct vc4_compile *c = state; - nir_foreach_instr_safe(instr, block) { if (instr->type != nir_instr_type_intrinsic) continue; @@ -712,10 +710,11 @@ vc4_nir_lower_blend_block(nir_block *block, void *state) void vc4_nir_lower_blend(nir_shader *s, struct vc4_compile *c) { - nir_foreach_function(s, function) { + nir_foreach_function(function, s) { if (function->impl) { - nir_foreach_block_call(function->impl, - vc4_nir_lower_blend_block, c); + nir_foreach_block(block, function->impl) { + vc4_nir_lower_blend_block(block, c); + } nir_metadata_preserve(function->impl, nir_metadata_block_index |