summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/ir3
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-09-18 15:53:54 -0700
committerEric Anholt <[email protected]>2018-10-15 17:16:43 -0700
commitdda1ae9b3cb9ea39c9435fba01c6c31a99c4d35e (patch)
tree6d57a596152835d5b68e3cad5148ba410bdec659 /src/gallium/drivers/freedreno/ir3
parentda15a0d88ea1a29968ee624186d895fe5ff0f574 (diff)
gallium/ttn: Convert inputs and outputs to derefs of variables.
This means that TTN shaders more closely resemble GTN shaders: they have inputs and outputs as variable derefs, with the variables having their .driver_location already set up for you. This will be useful for v3d to do input variable DCE in NIR, which we can't do when the TTN shaders never have a pre-nir_lower_io stage. Acked-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_shader.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.c b/src/gallium/drivers/freedreno/ir3/ir3_shader.c
index 125bf3b983e..63922bfe652 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_shader.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.c
@@ -309,9 +309,6 @@ ir3_shader_create(struct ir3_compiler *compiler,
if (cso->type == PIPE_SHADER_IR_NIR) {
/* we take ownership of the reference: */
nir = cso->ir.nir;
-
- NIR_PASS_V(nir, nir_lower_io, nir_var_all, ir3_glsl_type_size,
- (nir_lower_io_options)0);
} else {
debug_assert(cso->type == PIPE_SHADER_IR_TGSI);
if (fd_mesa_debug & FD_DBG_DISASM) {
@@ -320,6 +317,8 @@ ir3_shader_create(struct ir3_compiler *compiler,
}
nir = ir3_tgsi_to_nir(cso->tokens);
}
+ NIR_PASS_V(nir, nir_lower_io, nir_var_all, ir3_glsl_type_size,
+ (nir_lower_io_options)0);
/* do first pass optimization, ignoring the key: */
shader->nir = ir3_optimize_nir(shader, nir, NULL);
if (fd_mesa_debug & FD_DBG_DISASM) {