[Mesa-dev] [PATCH] nir: Allow using nir_lower_io_to_scalar_early on VS input vars.
Timothy Arceri
tarceri at itsqueeze.com
Fri Oct 26 22:40:25 UTC 2018
On Mon, Oct 15, 2018, at 5:18 PM, Eric Anholt wrote:
> 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).
> ---
> src/compiler/nir/nir_lower_io_to_scalar.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/compiler/nir/nir_lower_io_to_scalar.c b/src/compiler/
> nir/nir_lower_io_to_scalar.c
> index f0c2a6a95d6d..c64f641a0ae4 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 &&
As I understand it all current use of this pass skips vetex shader inputs via the mask param so this change shouldn't impact any other drivers so:
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
> var->data.location >= 0)
> continue;
>
> --
> 2.18.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list