Mesa (main): nir/linker: rename replace_constant_input to replace_varying_input_by_constant_load
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Oct 13 05:12:05 UTC 2021
Module: Mesa
Branch: main
Commit: 50c0451424a1bcf8e6a69780520a85ff684508b5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=50c0451424a1bcf8e6a69780520a85ff684508b5
Author: Qiang Yu <yuq825 at gmail.com>
Date: Wed Sep 29 15:22:33 2021 +0800
nir/linker: rename replace_constant_input to replace_varying_input_by_constant_load
To align with replace_varying_input_by_uniform_load and better
describe what it does.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Signed-off-by: Qiang Yu <yuq825 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12613>
---
src/compiler/nir/nir_linking_helpers.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/compiler/nir/nir_linking_helpers.c b/src/compiler/nir/nir_linking_helpers.c
index b32fee2ced3..bc1ee4dd548 100644
--- a/src/compiler/nir/nir_linking_helpers.c
+++ b/src/compiler/nir/nir_linking_helpers.c
@@ -1005,7 +1005,8 @@ can_replace_varying(nir_variable *out_var)
}
static bool
-replace_constant_input(nir_shader *shader, nir_intrinsic_instr *store_intr)
+replace_varying_input_by_constant_load(nir_shader *shader,
+ nir_intrinsic_instr *store_intr)
{
nir_function_impl *impl = nir_shader_get_entrypoint(shader);
@@ -1354,7 +1355,7 @@ nir_link_opt_varyings(nir_shader *producer, nir_shader *consumer)
nir_ssa_scalar uni_scalar;
nir_ssa_def *ssa = intr->src[1].ssa;
if (ssa->parent_instr->type == nir_instr_type_load_const) {
- progress |= replace_constant_input(consumer, intr);
+ progress |= replace_varying_input_by_constant_load(consumer, intr);
} else if (is_direct_uniform_load(ssa, &uni_scalar)) {
progress |= replace_varying_input_by_uniform_load(consumer, intr,
&uni_scalar);
More information about the mesa-commit
mailing list