diff options
author | Arcady Goldmints-Orlov <[email protected]> | 2020-02-07 14:18:49 -0600 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <[email protected]> | 2020-02-12 15:41:49 +0000 |
commit | e9f83185a221b446717c96c4df8dc64ced43e24f (patch) | |
tree | a2ed0de3dd09b2eea186c7fd8b58e591aeb71875 /src/compiler/nir | |
parent | e459c7f0a14b65617e16b92f42abad2fe5878872 (diff) |
Rename nir_lower_constant_initializers to nir_lower_variable_initalizers
This is naming is more clear as nir_variables can be initializes not
just with a nir_constant but with a pointer to another nir_variable.
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3047>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3047>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/meson.build | 2 | ||||
-rw-r--r-- | src/compiler/nir/nir.h | 2 | ||||
-rw-r--r-- | src/compiler/nir/nir_inline_functions.c | 4 | ||||
-rw-r--r-- | src/compiler/nir/nir_lower_variable_initializers.c (renamed from src/compiler/nir/nir_lower_constant_initializers.c) | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/nir/meson.build b/src/compiler/nir/meson.build index 315112759e9..8101dc8c870 100644 --- a/src/compiler/nir/meson.build +++ b/src/compiler/nir/meson.build @@ -124,7 +124,7 @@ files_libnir = files( 'nir_lower_clip.c', 'nir_lower_clip_cull_distance_arrays.c', 'nir_lower_clip_halfz.c', - 'nir_lower_constant_initializers.c', + 'nir_lower_variable_initializers.c', 'nir_lower_double_ops.c', 'nir_lower_drawpixels.c', 'nir_lower_fb_read.c', diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 969fbac60e5..4939240653b 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -3848,7 +3848,7 @@ bool nir_lower_vars_to_ssa(nir_shader *shader); bool nir_remove_dead_derefs(nir_shader *shader); bool nir_remove_dead_derefs_impl(nir_function_impl *impl); bool nir_remove_dead_variables(nir_shader *shader, nir_variable_mode modes); -bool nir_lower_constant_initializers(nir_shader *shader, +bool nir_lower_variable_initializers(nir_shader *shader, nir_variable_mode modes); bool nir_move_vec_src_uses_to_dest(nir_shader *shader); diff --git a/src/compiler/nir/nir_inline_functions.c b/src/compiler/nir/nir_inline_functions.c index 8226d50b44b..b1f83d6e03f 100644 --- a/src/compiler/nir/nir_inline_functions.c +++ b/src/compiler/nir/nir_inline_functions.c @@ -158,7 +158,7 @@ inline_function_impl(nir_function_impl *impl, struct set *inlined) * For most use-cases, function inlining is a multi-step process. The general * pattern employed by SPIR-V consumers and others is as follows: * - * 1. nir_lower_constant_initializers(shader, nir_var_function_temp) + * 1. nir_lower_variable_initializers(shader, nir_var_function_temp) * * This is needed because local variables from the callee are simply added * to the locals list for the caller and the information about where the @@ -213,7 +213,7 @@ inline_function_impl(nir_function_impl *impl, struct set *inlined) * spirv_to_nir returns the root function and so we can just use == whereas * with GL, you may have to look for a function named "main". * - * 6. nir_lower_constant_initializers(shader, ~nir_var_function_temp) + * 6. nir_lower_variable_initializers(shader, ~nir_var_function_temp) * * Lowering constant initializers on inputs, outputs, global variables, * etc. requires that we know the main entrypoint so that we know where to diff --git a/src/compiler/nir/nir_lower_constant_initializers.c b/src/compiler/nir/nir_lower_variable_initializers.c index 03f5a2f404c..b2a17d0584b 100644 --- a/src/compiler/nir/nir_lower_constant_initializers.c +++ b/src/compiler/nir/nir_lower_variable_initializers.c @@ -84,7 +84,7 @@ lower_const_initializer(struct nir_builder *b, struct exec_list *var_list) } bool -nir_lower_constant_initializers(nir_shader *shader, nir_variable_mode modes) +nir_lower_variable_initializers(nir_shader *shader, nir_variable_mode modes) { bool progress = false; |