[Mesa-dev] [PATCH v2 2/5] spirv: Support exporting viewport & layer from VS and TES.

Jason Ekstrand jason at jlekstrand.net
Wed Aug 16 14:05:00 UTC 2017


It would be nice to have some tests for this somewhere.


On August 14, 2017 17:59:59 Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl> wrote:

> Reviewed-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/compiler/spirv/vtn_variables.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/src/compiler/spirv/vtn_variables.c 
> b/src/compiler/spirv/vtn_variables.c
> index 4432e72e54a..599b9b11a59 100644
> --- a/src/compiler/spirv/vtn_variables.c
> +++ b/src/compiler/spirv/vtn_variables.c
> @@ -1061,19 +1061,15 @@ vtn_get_builtin_location(struct vtn_builder *b,
>        *location = VARYING_SLOT_LAYER;
>        if (b->shader->stage == MESA_SHADER_FRAGMENT)
>           *mode = nir_var_shader_in;
> -      else if (b->shader->stage == MESA_SHADER_GEOMETRY)
> -         *mode = nir_var_shader_out;
>        else
> -         unreachable("invalid stage for SpvBuiltInLayer");
> +         *mode = nir_var_shader_out;
>        break;
>     case SpvBuiltInViewportIndex:
>        *location = VARYING_SLOT_VIEWPORT;
> -      if (b->shader->stage == MESA_SHADER_GEOMETRY)
> -         *mode = nir_var_shader_out;
> -      else if (b->shader->stage == MESA_SHADER_FRAGMENT)
> +      if (b->shader->stage == MESA_SHADER_FRAGMENT)
>           *mode = nir_var_shader_in;
>        else
> -         unreachable("invalid stage for SpvBuiltInViewportIndex");
> +         *mode = nir_var_shader_out;
>        break;
>     case SpvBuiltInTessLevelOuter:
>        *location = VARYING_SLOT_TESS_LEVEL_OUTER;
> --
> 2.14.1
>
> _______________________________________________
> 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