summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-12-11 11:49:00 +1100
committerTimothy Arceri <[email protected]>2019-01-02 12:19:17 +1100
commit50de3f80a807c657b317173c437f217bc7bd74da (patch)
treeed252597e13f75dbd14f36f7baa7393b4f84280d /src
parent0a4378ce562dbf68b7b58165f2dcfc94f831559f (diff)
nir: rename nir_link_constant_varyings() nir_link_opt_varyings()
The following patches will add support for an additional optimisation so this function will no longer just optimise varying constants. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_pipeline.c4
-rw-r--r--src/compiler/nir/nir.h2
-rw-r--r--src/compiler/nir/nir_linking_helpers.c2
-rw-r--r--src/intel/compiler/brw_nir.c2
-rw-r--r--src/mesa/state_tracker/st_glsl_to_nir.cpp2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 3561d17aaba..7bc0bd99943 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -1814,8 +1814,8 @@ radv_link_shaders(struct radv_pipeline *pipeline, nir_shader **shaders)
nir_lower_io_arrays_to_elements(ordered_shaders[i],
ordered_shaders[i - 1]);
- if (nir_link_constant_varyings(ordered_shaders[i],
- ordered_shaders[i - 1]))
+ if (nir_link_opt_varyings(ordered_shaders[i],
+ ordered_shaders[i - 1]))
radv_optimize_nir(ordered_shaders[i - 1], false, false);
nir_remove_dead_variables(ordered_shaders[i],
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 12bbfa3220e..39041ec084b 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2870,7 +2870,7 @@ bool nir_remove_unused_io_vars(nir_shader *shader, struct exec_list *var_list,
void nir_compact_varyings(nir_shader *producer, nir_shader *consumer,
bool default_to_smooth_interp);
void nir_link_xfb_varyings(nir_shader *producer, nir_shader *consumer);
-bool nir_link_constant_varyings(nir_shader *producer, nir_shader *consumer);
+bool nir_link_opt_varyings(nir_shader *producer, nir_shader *consumer);
typedef enum {
/* If set, this forces all non-flat fragment shader inputs to be
diff --git a/src/compiler/nir/nir_linking_helpers.c b/src/compiler/nir/nir_linking_helpers.c
index ffe2d370226..582d6b90b94 100644
--- a/src/compiler/nir/nir_linking_helpers.c
+++ b/src/compiler/nir/nir_linking_helpers.c
@@ -634,7 +634,7 @@ try_replace_constant_input(nir_shader *shader,
}
bool
-nir_link_constant_varyings(nir_shader *producer, nir_shader *consumer)
+nir_link_opt_varyings(nir_shader *producer, nir_shader *consumer)
{
/* TODO: Add support for more shader stage combinations */
if (consumer->info.stage != MESA_SHADER_FRAGMENT ||
diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c
index 4fdc98b6cf4..9ba3fca4e0c 100644
--- a/src/intel/compiler/brw_nir.c
+++ b/src/intel/compiler/brw_nir.c
@@ -771,7 +771,7 @@ brw_nir_link_shaders(const struct brw_compiler *compiler,
*consumer = brw_nir_optimize(*consumer, compiler, c_is_scalar, false);
}
- if (nir_link_constant_varyings(*producer, *consumer))
+ if (nir_link_opt_varyings(*producer, *consumer))
*consumer = brw_nir_optimize(*consumer, compiler, c_is_scalar, false);
NIR_PASS_V(*producer, nir_remove_dead_variables, nir_var_shader_out);
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index dce96ab58b6..af83a341e90 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -588,7 +588,7 @@ st_nir_link_shaders(nir_shader **producer, nir_shader **consumer, bool scalar)
{
nir_lower_io_arrays_to_elements(*producer, *consumer);
- if (nir_link_constant_varyings(*producer, *consumer))
+ if (nir_link_opt_varyings(*producer, *consumer))
st_nir_opts(*consumer, scalar);
NIR_PASS_V(*producer, nir_remove_dead_variables, nir_var_shader_out);