summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-09-18 10:34:11 -0700
committerEric Anholt <[email protected]>2018-10-30 10:46:52 -0700
commit17c81989521731af25a633622a0ded437538ab00 (patch)
treef6d099f02c3e4927a58f5d430a2ade5b6a9f8b3c /src/gallium
parentfc85f7cfdc154e6c2f29445b6023b379c3c18864 (diff)
v3d: Use nir_lower_io_to_scalar_early to DCE unused VS input components.
This lets us trim unused trailing components in the vertex attributes, reducing the size of our VPM allocations.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/v3d/v3d_program.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c
index 1d4b0bb2080..17ded7571c4 100644
--- a/src/gallium/drivers/v3d/v3d_program.c
+++ b/src/gallium/drivers/v3d/v3d_program.c
@@ -210,7 +210,10 @@ v3d_shader_state_create(struct pipe_context *pctx,
so->was_tgsi = true;
}
- NIR_PASS_V(s, nir_lower_io, nir_var_all & ~nir_var_uniform,
+ nir_variable_mode lower_mode = nir_var_all & ~nir_var_uniform;
+ if (s->info.stage == MESA_SHADER_VERTEX)
+ lower_mode &= ~nir_var_shader_in;
+ NIR_PASS_V(s, nir_lower_io, lower_mode,
type_size,
(nir_lower_io_options)0);