diff options
author | Eric Anholt <[email protected]> | 2018-09-18 10:35:34 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-10-30 10:46:52 -0700 |
commit | 8265dfaa87ef3b46288afdccae86221203c9b44e (patch) | |
tree | 3a0eced651d31f0f6737d5657c13de737d90c1d8 /src | |
parent | f48b742289ea72d7d0ec518ed6f76bc885548888 (diff) |
nir: Allow using nir_lower_io_to_scalar_early on VS input vars.
This will be used on V3D to cut down the size of the VS inputs in the VPM
(memory area for sharing data between shader stages).
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/nir_lower_io_to_scalar.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_lower_io_to_scalar.c b/src/compiler/nir/nir_lower_io_to_scalar.c index 2b98e298cce..929761fa888 100644 --- a/src/compiler/nir/nir_lower_io_to_scalar.c +++ b/src/compiler/nir/nir_lower_io_to_scalar.c @@ -320,7 +320,9 @@ nir_lower_io_to_scalar_early(nir_shader *shader, nir_variable_mode mask) if (glsl_type_is_64bit(glsl_without_array(var->type))) continue; - if (var->data.location < VARYING_SLOT_VAR0 && + if (!(shader->info.stage == MESA_SHADER_VERTEX && + mode == nir_var_shader_in) && + var->data.location < VARYING_SLOT_VAR0 && var->data.location >= 0) continue; |