[Mesa-dev] [PATCH] tgsi: properly parse indirect dimension references (e.g. for UBOs)

Brian Paul brian.e.paul at gmail.com
Wed Jul 9 07:51:09 PDT 2014


On Wed, Jul 9, 2014 at 12:29 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:

> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>  src/gallium/auxiliary/tgsi/tgsi_text.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c
> b/src/gallium/auxiliary/tgsi/tgsi_text.c
> index c6134c5..6403344 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_text.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
> @@ -804,6 +804,13 @@ parse_src_operand(
>        src->Dimension.Indirect = 0;
>        src->Dimension.Dimension = 0;
>        src->Dimension.Index = bracket[0].index;
> +      if (bracket[0].ind_file != TGSI_FILE_NULL) {
> +         src->Dimension.Indirect = 1;
> +         src->DimIndirect.File = bracket[0].ind_file;
> +         src->DimIndirect.Index = bracket[0].ind_index;
> +         src->DimIndirect.Swizzle = bracket[0].ind_comp;
> +         src->DimIndirect.ArrayID = bracket[0].ind_array;
> +      }
>        bracket[0] = bracket[1];
>     }
>     src->Register.Index = bracket[0].index;
>
>
Reviewed-by: Brian Paul <brianp at vmware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140709/9198f88e/attachment.html>


More information about the mesa-dev mailing list