Mesa (master): nir: rename lower_outputs_to_temporaries -> lower_io_to_temporaries
Rob Clark
robclark at kemper.freedesktop.org
Wed May 11 16:59:54 UTC 2016
Module: Mesa
Branch: master
Commit: b085016f94721a6c18f7076fc37c450a98e6bdbc
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b085016f94721a6c18f7076fc37c450a98e6bdbc
Author: Rob Clark <robclark at freedesktop.org>
Date: Fri Mar 25 13:52:26 2016 -0400
nir: rename lower_outputs_to_temporaries -> lower_io_to_temporaries
Since it will gain support to lower inputs, give it a more generic name.
Signed-off-by: Rob Clark <robclark at freedesktop.org>
---
src/compiler/Makefile.sources | 2 +-
src/compiler/nir/nir.h | 4 ++--
...wer_outputs_to_temporaries.c => nir_lower_io_to_temporaries.c} | 8 ++++----
src/mesa/drivers/dri/i965/brw_nir.c | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/compiler/Makefile.sources b/src/compiler/Makefile.sources
index fabab77..66fbd84 100644
--- a/src/compiler/Makefile.sources
+++ b/src/compiler/Makefile.sources
@@ -199,8 +199,8 @@ NIR_FILES = \
nir/nir_lower_idiv.c \
nir/nir_lower_indirect_derefs.c \
nir/nir_lower_io.c \
+ nir/nir_lower_io_to_temporaries.c \
nir/nir_lower_io_types.c \
- nir/nir_lower_outputs_to_temporaries.c \
nir/nir_lower_passthrough_edgeflags.c \
nir/nir_lower_phis_to_scalar.c \
nir/nir_lower_returns.c \
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 68f948e..5410f0b 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2279,8 +2279,8 @@ bool nir_lower_indirect_derefs(nir_shader *shader, nir_variable_mode modes);
bool nir_lower_locals_to_regs(nir_shader *shader);
-void nir_lower_outputs_to_temporaries(nir_shader *shader,
- nir_function *entrypoint);
+void nir_lower_io_to_temporaries(nir_shader *shader, nir_function *entrypoint);
+
void nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint);
void nir_assign_var_locations(struct exec_list *var_list,
diff --git a/src/compiler/nir/nir_lower_outputs_to_temporaries.c b/src/compiler/nir/nir_lower_io_to_temporaries.c
similarity index 95%
rename from src/compiler/nir/nir_lower_outputs_to_temporaries.c
rename to src/compiler/nir/nir_lower_io_to_temporaries.c
index 0dfb7b0..bf16aec 100644
--- a/src/compiler/nir/nir_lower_outputs_to_temporaries.c
+++ b/src/compiler/nir/nir_lower_io_to_temporaries.c
@@ -29,13 +29,13 @@
#include "nir.h"
-struct lower_outputs_state {
+struct lower_io_state {
nir_shader *shader;
struct exec_list old_outputs;
};
static void
-emit_output_copies(nir_cursor cursor, struct lower_outputs_state *state)
+emit_output_copies(nir_cursor cursor, struct lower_io_state *state)
{
assert(exec_list_length(&state->shader->outputs) ==
exec_list_length(&state->old_outputs));
@@ -55,9 +55,9 @@ emit_output_copies(nir_cursor cursor, struct lower_outputs_state *state)
}
void
-nir_lower_outputs_to_temporaries(nir_shader *shader, nir_function *entrypoint)
+nir_lower_io_to_temporaries(nir_shader *shader, nir_function *entrypoint)
{
- struct lower_outputs_state state;
+ struct lower_io_state state;
if (shader->stage == MESA_SHADER_TESS_CTRL)
return;
diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c
index fb658ec..07d24b2 100644
--- a/src/mesa/drivers/dri/i965/brw_nir.c
+++ b/src/mesa/drivers/dri/i965/brw_nir.c
@@ -563,7 +563,7 @@ brw_create_nir(struct brw_context *brw,
/* First, lower the GLSL IR or Mesa IR to NIR */
if (shader_prog) {
nir = glsl_to_nir(shader_prog, stage, options);
- OPT_V(nir_lower_outputs_to_temporaries, nir_shader_get_entrypoint(nir));
+ OPT_V(nir_lower_io_to_temporaries, nir_shader_get_entrypoint(nir));
} else {
nir = prog_to_nir(prog, options);
OPT_V(nir_convert_to_ssa); /* turn registers into SSA */
More information about the mesa-commit
mailing list