Module: Mesa Branch: main Commit: 9b6dbb2a2b15a36e5fb8d066fc3975f5d6d1e319 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9b6dbb2a2b15a36e5fb8d066fc3975f5d6d1e319
Author: Yonggang Luo <[email protected]> Date: Fri Jun 30 03:42:48 2023 +0800 panfrost: Convert to use nir_foreach_function_with_impl in function midgard_compile_shader_nir Signed-off-by: Yonggang Luo <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23960> --- src/panfrost/midgard/midgard_compile.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index c6d3b7f8129..d1ba982a376 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -2912,10 +2912,7 @@ midgard_compile_shader_nir(nir_shader *nir, info->tls_size = nir->scratch_size; - nir_foreach_function(func, nir) { - if (!func->impl) - continue; - + nir_foreach_function_with_impl(func, impl, nir) { list_inithead(&ctx->blocks); ctx->block_count = 0; ctx->func = func; @@ -2931,7 +2928,7 @@ midgard_compile_shader_nir(nir_shader *nir, ++ctx->instruction_count; } - emit_cf_list(ctx, &func->impl->body); + emit_cf_list(ctx, &impl->body); break; /* TODO: Multi-function shaders */ }
