From 11fb6c30b3795c9484898d7a36efbe09115ab409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Mon, 10 Nov 2025 12:17:43 +0100 Subject: [PATCH] nir/lower_vars_to_ssa: return early if there is no local variables to lower Part-of: --- src/compiler/nir/nir_lower_vars_to_ssa.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/nir/nir_lower_vars_to_ssa.c b/src/compiler/nir/nir_lower_vars_to_ssa.c index afe44ddc5ca..3ed843da847 100644 --- a/src/compiler/nir/nir_lower_vars_to_ssa.c +++ b/src/compiler/nir/nir_lower_vars_to_ssa.c @@ -793,6 +793,10 @@ rename_variables(struct lower_variables_state *state) static bool nir_lower_vars_to_ssa_impl(nir_function_impl *impl) { + /* Nothing to do... */ + if (exec_list_is_empty(&impl->locals)) + return nir_no_progress(impl); + struct lower_variables_state state; state.shader = impl->function->shader;