From b8772a559a223be0817ba3abb4392d559fee9891 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 22 Nov 2019 19:31:46 -0500 Subject: [PATCH] st/mesa: don't use ** in the st_nir_link_shaders signature Reviewed-by: Timothy Arceri --- src/mesa/state_tracker/st_glsl_to_nir.cpp | 40 +++++++++++------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 343b2400eb3..c7a1e12530d 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -538,37 +538,37 @@ st_nir_vectorize_io(nir_shader *producer, nir_shader *consumer) } static void -st_nir_link_shaders(nir_shader **producer, nir_shader **consumer) +st_nir_link_shaders(nir_shader *producer, nir_shader *consumer) { - if ((*producer)->options->lower_to_scalar) { - NIR_PASS_V(*producer, nir_lower_io_to_scalar_early, nir_var_shader_out); - NIR_PASS_V(*consumer, nir_lower_io_to_scalar_early, nir_var_shader_in); + if (producer->options->lower_to_scalar) { + NIR_PASS_V(producer, nir_lower_io_to_scalar_early, nir_var_shader_out); + NIR_PASS_V(consumer, nir_lower_io_to_scalar_early, nir_var_shader_in); } - nir_lower_io_arrays_to_elements(*producer, *consumer); + nir_lower_io_arrays_to_elements(producer, consumer); - st_nir_opts(*producer); - st_nir_opts(*consumer); + st_nir_opts(producer); + st_nir_opts(consumer); - if (nir_link_opt_varyings(*producer, *consumer)) - st_nir_opts(*consumer); + if (nir_link_opt_varyings(producer, consumer)) + st_nir_opts(consumer); - NIR_PASS_V(*producer, nir_remove_dead_variables, nir_var_shader_out); - NIR_PASS_V(*consumer, nir_remove_dead_variables, nir_var_shader_in); + NIR_PASS_V(producer, nir_remove_dead_variables, nir_var_shader_out); + NIR_PASS_V(consumer, nir_remove_dead_variables, nir_var_shader_in); - if (nir_remove_unused_varyings(*producer, *consumer)) { - NIR_PASS_V(*producer, nir_lower_global_vars_to_local); - NIR_PASS_V(*consumer, nir_lower_global_vars_to_local); + if (nir_remove_unused_varyings(producer, consumer)) { + NIR_PASS_V(producer, nir_lower_global_vars_to_local); + NIR_PASS_V(consumer, nir_lower_global_vars_to_local); - st_nir_opts(*producer); - st_nir_opts(*consumer); + st_nir_opts(producer); + st_nir_opts(consumer); /* Optimizations can cause varyings to become unused. * nir_compact_varyings() depends on all dead varyings being removed so * we need to call nir_remove_dead_variables() again here. */ - NIR_PASS_V(*producer, nir_remove_dead_variables, nir_var_shader_out); - NIR_PASS_V(*consumer, nir_remove_dead_variables, nir_var_shader_in); + NIR_PASS_V(producer, nir_remove_dead_variables, nir_var_shader_out); + NIR_PASS_V(consumer, nir_remove_dead_variables, nir_var_shader_in); } } @@ -718,8 +718,8 @@ st_link_nir(struct gl_context *ctx, * stage. */ for (int i = num_shaders - 2; i >= 0; i--) { - st_nir_link_shaders(&linked_shader[i]->Program->nir, - &linked_shader[i + 1]->Program->nir); + st_nir_link_shaders(linked_shader[i]->Program->nir, + linked_shader[i + 1]->Program->nir); } for (unsigned i = 0; i < num_shaders; i++) { -- 2.30.2