[Mesa-dev] [PATCH 04/20] tgsi/scan: track which shader images are really buffers
Ilia Mirkin
imirkin at alum.mit.edu
Tue Mar 15 18:45:33 UTC 2016
Patches 1-4 are
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
On Tue, Mar 15, 2016 at 2:28 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> ---
> src/gallium/auxiliary/tgsi/tgsi_scan.c | 3 +++
> src/gallium/auxiliary/tgsi/tgsi_scan.h | 4 ++++
> 2 files changed, 7 insertions(+)
>
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
> index dee6884..65bdab5 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
> @@ -427,6 +427,9 @@ scan_declaration(struct tgsi_shader_info *info,
> }
> } else if (file == TGSI_FILE_SAMPLER) {
> info->samplers_declared |= 1 << reg;
> + } else if (file == TGSI_FILE_IMAGE) {
> + if (fulldecl->Image.Resource == TGSI_TEXTURE_BUFFER)
> + info->images_buffers |= 1 << reg;
> }
> }
> }
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h
> index f52729a..d777f23 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h
> +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h
> @@ -123,6 +123,10 @@ struct tgsi_shader_info
> */
> unsigned images_writemask;
> /**
> + * Bitmask indicating which declared image is a buffer.
> + */
> + unsigned images_buffers;
> + /**
> * Bitmask indicating which register files are accessed with
> * indirect addressing. The bits are (1 << TGSI_FILE_x), etc.
> */
> --
> 2.5.0
>
> _______________________________________________
> 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