[Mesa-dev] [PATCH] spirv: Use the system value version of gl_FrontFace

Kenneth Graunke kenneth at whitecape.org
Tue Jun 21 06:48:32 UTC 2016


On Monday, June 20, 2016 11:42:09 PM PDT Jason Ekstrand wrote:
> SPIR-V treats it as an input but NIR wants the system value.  This
> shouldn't have been too much of a surprise given that we have to do the
> same conversion in the GLSL IR to NIR pass.
> 
> Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
> ---
>  src/compiler/spirv/vtn_variables.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
> index 61fc184..fe2494b 100644
> --- a/src/compiler/spirv/vtn_variables.c
> +++ b/src/compiler/spirv/vtn_variables.c
> @@ -839,8 +839,8 @@ vtn_get_builtin_location(struct vtn_builder *b,
>        assert(*mode == nir_var_shader_in);
>        break;
>     case SpvBuiltInFrontFacing:
> -      *location = VARYING_SLOT_FACE;
> -      assert(*mode == nir_var_shader_in);
> +      *location = SYSTEM_VALUE_FRONT_FACE;
> +      set_mode_system_value(mode);
>        break;
>     case SpvBuiltInSampleId:
>        *location = SYSTEM_VALUE_SAMPLE_ID;
> 

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160620/edb8034b/attachment.sig>


More information about the mesa-dev mailing list