From 9cb70c6ee01c9fa1dff564439d9e72f2fdab0c79 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 30 Jan 2023 20:11:53 -0600 Subject: [PATCH] nv50/nir: Lower to scratch AFTER optimization Reviewed-by: M Henning Reviewed-by: Karol Herbst Part-of: --- src/nouveau/codegen/nv50_ir_from_nir.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/nouveau/codegen/nv50_ir_from_nir.cpp b/src/nouveau/codegen/nv50_ir_from_nir.cpp index 239e786..34c4bb4 100644 --- a/src/nouveau/codegen/nv50_ir_from_nir.cpp +++ b/src/nouveau/codegen/nv50_ir_from_nir.cpp @@ -3201,11 +3201,6 @@ Converter::run() NIR_PASS_V(nir, nir_opt_deref); NIR_PASS_V(nir, nir_lower_vars_to_ssa); - /* codegen assumes vec4 alignment for memory */ - NIR_PASS_V(nir, nir_lower_vars_to_explicit_types, nir_var_function_temp, function_temp_type_info); - NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_function_temp, nir_address_format_32bit_offset); - NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_function_temp, NULL); - NIR_PASS_V(nir, nir_lower_io, nir_var_shader_in | nir_var_shader_out, type_size, (nir_lower_io_options)0); @@ -3244,6 +3239,12 @@ Converter::run() NIR_PASS(progress, nir, nir_lower_64bit_phis); } while (progress); + /* codegen assumes vec4 alignment for memory */ + NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_function_temp, NULL); + NIR_PASS_V(nir, nir_lower_vars_to_explicit_types, nir_var_function_temp, function_temp_type_info); + NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_function_temp, nir_address_format_32bit_offset); + NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_function_temp, NULL); + NIR_PASS_V(nir, nir_opt_combine_barriers, NULL, NULL); nir_move_options move_options = -- 2.7.4