After calling nir_lower_regs_to_ssa(..) nir_function_impl's reg_alloc counter still hold its old value. Just call nir_index_local_regs(..) to set reg_alloc to the correct value - which should be 0.
Signed-off-by: Christian Gmeiner <[email protected]> --- src/compiler/nir/nir_lower_regs_to_ssa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_lower_regs_to_ssa.c b/src/compiler/nir/nir_lower_regs_to_ssa.c index d70e70260b..7214e92b90 100644 --- a/src/compiler/nir/nir_lower_regs_to_ssa.c +++ b/src/compiler/nir/nir_lower_regs_to_ssa.c @@ -275,6 +275,8 @@ nir_lower_regs_to_ssa_impl(nir_function_impl *impl) } } + nir_index_local_regs(impl); + free(state.values); nir_metadata_preserve(impl, nir_metadata_block_index | -- 2.17.1 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
