From 8e7ea4a882b84c4f434ce1847c4ab085ac6504c0 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Thu, 25 Sep 2025 15:36:51 +0100 Subject: [PATCH] nir/lower_shader_calls: reobtain impl after NIR_PASS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rhys Perry Reviewed-by: Marek Olšák Reviewed-by: Georg Lehmann Part-of: --- src/compiler/nir/nir_lower_shader_calls.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/compiler/nir/nir_lower_shader_calls.c b/src/compiler/nir/nir_lower_shader_calls.c index 5dc94924f25..ebbc4de6d16 100644 --- a/src/compiler/nir/nir_lower_shader_calls.c +++ b/src/compiler/nir/nir_lower_shader_calls.c @@ -1993,6 +1993,11 @@ nir_lower_shader_calls(nir_shader *shader, bool progress = false; NIR_PASS(progress, shader, wrap_instrs, instr_is_shader_call); + /* NIR_PASS might recreate the function_impl when NIR_DEBUG=serialize or + * NIR_DEBUG=clone is used. + */ + impl = nir_shader_get_entrypoint(shader); + nir_rematerialize_derefs_in_use_blocks_impl(impl); if (progress)