[Mesa-dev] [PATCH 1/3] gallium: add new semantic for clip vertex.

Brian Paul brianp at vmware.com
Wed Jan 4 08:37:31 PST 2012


On 01/04/2012 05:12 AM, Dave Airlie wrote:
> From: Dave Airlie<airlied at redhat.com>
>
> This is to match the gl_ClipVertex output from GLSL 1.20.
>
> Signed-off-by: Dave Airlie<airlied at redhat.com>
> ---
>   src/gallium/auxiliary/tgsi/tgsi_dump.c     |    3 ++-
>   src/gallium/include/pipe/p_shader_tokens.h |    3 ++-
>   2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
> index e830aa5..6c5fc68 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
> @@ -129,7 +129,8 @@ static const char *semantic_names[] =
>      "PRIM_ID",
>      "INSTANCEID",
>      "VERTEXID",
> -   "STENCIL"
> +   "STENCIL",
> +   "VERTEXCLIP"
>   };

There's also an array of semantic strings in tgsi_text.c.  But I just 
posted a patch to consolidate these string arrays and add static 
assertions to void missing things like that in the future.


>
>   static const char *immediate_type_names[] =
> diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
> index 10cfaf6..35835bb 100644
> --- a/src/gallium/include/pipe/p_shader_tokens.h
> +++ b/src/gallium/include/pipe/p_shader_tokens.h
> @@ -146,7 +146,8 @@ struct tgsi_declaration_dimension
>   #define TGSI_SEMANTIC_INSTANCEID 10
>   #define TGSI_SEMANTIC_VERTEXID   11
>   #define TGSI_SEMANTIC_STENCIL    12
> -#define TGSI_SEMANTIC_COUNT      13 /**<  number of semantic values */
> +#define TGSI_SEMANTIC_CLIPVERTEX 13
> +#define TGSI_SEMANTIC_COUNT      14 /**<  number of semantic values */
>
>   struct tgsi_declaration_semantic
>   {



More information about the mesa-dev mailing list