From: Rhys Perry Date: Mon, 21 Sep 2020 14:56:25 +0000 (+0100) Subject: nir: return progress from nir_lower_io_to_scalar_early X-Git-Tag: upstream/21.0.0~4434 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f2671bcc5f6b9e3d22f12e18ac254d440dc3510;p=platform%2Fupstream%2Fmesa.git nir: return progress from nir_lower_io_to_scalar_early Signed-off-by: Rhys Perry Reviewed-by: Samuel Pitoiset Part-of: --- diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 332903b..cca046f 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -4413,7 +4413,7 @@ void nir_lower_io_arrays_to_elements(nir_shader *producer, nir_shader *consumer) void nir_lower_io_arrays_to_elements_no_indirects(nir_shader *shader, bool outputs_only); void nir_lower_io_to_scalar(nir_shader *shader, nir_variable_mode mask); -void nir_lower_io_to_scalar_early(nir_shader *shader, nir_variable_mode mask); +bool nir_lower_io_to_scalar_early(nir_shader *shader, nir_variable_mode mask); bool nir_lower_io_to_vector(nir_shader *shader, nir_variable_mode mask); bool nir_lower_fragcolor(nir_shader *shader); diff --git a/src/compiler/nir/nir_lower_io_to_scalar.c b/src/compiler/nir/nir_lower_io_to_scalar.c index b54d775..d2ce42e 100644 --- a/src/compiler/nir/nir_lower_io_to_scalar.c +++ b/src/compiler/nir/nir_lower_io_to_scalar.c @@ -374,7 +374,7 @@ nir_lower_io_to_scalar_early_instr(nir_builder *b, nir_instr *instr, void *data) * This function is intended to be called earlier than nir_lower_io_to_scalar() * i.e. before nir_lower_io() is called. */ -void +bool nir_lower_io_to_scalar_early(nir_shader *shader, nir_variable_mode mask) { struct io_to_scalar_early_state state = { @@ -383,11 +383,11 @@ nir_lower_io_to_scalar_early(nir_shader *shader, nir_variable_mode mask) .mask = mask }; - nir_shader_instructions_pass(shader, - nir_lower_io_to_scalar_early_instr, - nir_metadata_block_index | - nir_metadata_dominance, - &state); + bool progress = nir_shader_instructions_pass(shader, + nir_lower_io_to_scalar_early_instr, + nir_metadata_block_index | + nir_metadata_dominance, + &state); /* Remove old input from the shaders inputs list */ hash_table_foreach(state.split_inputs, entry) { @@ -409,4 +409,6 @@ nir_lower_io_to_scalar_early(nir_shader *shader, nir_variable_mode mask) _mesa_hash_table_destroy(state.split_outputs, NULL); nir_remove_dead_derefs(shader); + + return progress; }