[Mesa-dev] [PATCH] tgsi: store writes_primid when scanning tgsi

Marek Olšák maraeo at gmail.com
Thu Dec 1 17:17:34 UTC 2016


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Thu, Dec 1, 2016 at 6:14 PM, Tim Rowley <timothy.o.rowley at intel.com> wrote:
> ---
>  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 84d6456..77fe6b3 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
> @@ -548,6 +548,9 @@ scan_declaration(struct tgsi_shader_info *info,
>           info->num_outputs = MAX2(info->num_outputs, reg + 1);
>
>           switch (semName) {
> +         case TGSI_SEMANTIC_PRIMID:
> +            info->writes_primid = true;
> +            break;
>           case TGSI_SEMANTIC_VIEWPORT_INDEX:
>              info->writes_viewport_index = true;
>              break;
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h
> index fe503e8..e4f4018 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h
> +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h
> @@ -113,6 +113,7 @@ struct tgsi_shader_info
>     boolean writes_position;
>     boolean writes_psize;
>     boolean writes_clipvertex;
> +   boolean writes_primid;
>     boolean writes_viewport_index;
>     boolean writes_layer;
>     boolean writes_memory; /**< contains stores or atomics to buffers or images */
> --
> 2.7.4
>
> _______________________________________________
> 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