[Mesa-dev] [PATCH] nir: call nir_index_local_regs(..) to update reg_alloc

Christian Gmeiner christian.gmeiner at gmail.com
Sun Jun 24 14:36:23 UTC 2018


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 <christian.gmeiner at gmail.com>
---
 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



More information about the mesa-dev mailing list