[Mesa-dev] [PATCH 1/3] tgsi/scan: add flag colors_written

Alex Deucher alexdeucher at gmail.com
Thu Dec 10 09:20:20 PST 2015


On Thu, Dec 10, 2015 at 8:09 AM, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> This is a prerequisite for the following r600g fix.
>
> Cc: 11.0 11.1 <mesa-stable at lists.freedesktop.org>

For the series:
Reviewed-by: Alex Deucher <alexander.deucher 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 4645ef2..e04f407 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
> @@ -365,6 +365,9 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
>                    info->output_semantic_index[reg] = (ubyte) semIndex;
>                    info->num_outputs++;
>
> +                  if (semName == TGSI_SEMANTIC_COLOR)
> +                     info->colors_written |= 1 << semIndex;
> +
>                    if (procType == TGSI_PROCESSOR_VERTEX ||
>                        procType == TGSI_PROCESSOR_GEOMETRY ||
>                        procType == TGSI_PROCESSOR_TESS_CTRL ||
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h
> index d60ccab..7e9a559 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
>
>     uint opcode_count[TGSI_OPCODE_LAST];  /**< opcode histogram */
>
> +   ubyte colors_written;
>     boolean reads_position; /**< does fragment shader read position? */
>     boolean reads_z; /**< does fragment shader read depth? */
>     boolean writes_z;  /**< does fragment shader write Z value? */
> --
> 2.1.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list