From b9dea9bc45299f19c445170a4cac27810547de00 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 9 Mar 2015 01:58:53 -0700 Subject: [PATCH] i965/nir: Lower to registers a bit later. We can't safely call nir_optimize() with register present, since several passes called in the loop can't handle registers, and will fail asserts. Notably, nir_lower_vec_alus() and nir_opt_algebraic() really don't want registers. Signed-off-by: Kenneth Graunke Reviewed-by: Jason Ekstrand --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index ef836939705..c225c00f973 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -108,9 +108,6 @@ fs_visitor::emit_nir_code() nir_lower_io(nir); nir_validate_shader(nir); - nir_lower_locals_to_regs(nir); - nir_validate_shader(nir); - nir_remove_dead_variables(nir); nir_validate_shader(nir); @@ -125,6 +122,9 @@ fs_visitor::emit_nir_code() nir_optimize(nir); + nir_lower_locals_to_regs(nir); + nir_validate_shader(nir); + nir_lower_to_source_mods(nir); nir_validate_shader(nir); nir_copy_prop(nir); -- 2.30.2