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;