[Mesa-dev] [PATCH 5/5] tgsi: add tgsi_shader_info::writes_clipvertex

Roland Scheidegger sroland at vmware.com
Tue Dec 9 16:00:20 PST 2014


Am 09.12.2014 um 12:28 schrieb Marek Olšák:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> ---
>  src/gallium/auxiliary/tgsi/tgsi_scan.c | 3 +++
>  src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
> index 9d155c9..649c327 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
> @@ -245,6 +245,9 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
>                       else if (semName == TGSI_SEMANTIC_PSIZE) {
>                          info->writes_psize = TRUE;
>                       }
> +                     else if (semName == TGSI_SEMANTIC_CLIPVERTEX) {
> +                        info->writes_clipvertex = TRUE;
> +                     }
>                    }
>  
>                    if (procType == TGSI_PROCESSOR_FRAGMENT) {
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h
> index 5607997..61ce813 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h
> +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h
> @@ -77,6 +77,7 @@ struct tgsi_shader_info
>     boolean uses_primid;
>     boolean uses_frontface;
>     boolean writes_psize;
> +   boolean writes_clipvertex;
>     boolean writes_viewport_index;
>     boolean writes_layer;
>     boolean is_msaa_sampler[PIPE_MAX_SAMPLERS];
> 

The tgsi changes in this series look good to me.
In fact I think we've got some similar code to 3/5 and 5/5 in some
branch already so I guess this is more universally useful :-).

Roland



More information about the mesa-dev mailing list