[Mesa-dev] [PATCH] tgsi: fix uninitialized declaration array fields

Jose Fonseca jfonseca at vmware.com
Tue Mar 19 13:05:00 PDT 2013



----- Original Message -----
> Fixes a few regressions since the TGSI array changes.
> ---
>  src/gallium/auxiliary/tgsi/tgsi_build.c |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c
> b/src/gallium/auxiliary/tgsi/tgsi_build.c
> index 435d94a..509bc5c 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_build.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
> @@ -109,6 +109,7 @@ tgsi_default_declaration( void )
>     declaration.Semantic = 0;
>     declaration.Invariant = 0;
>     declaration.Local = 0;
> +   declaration.Array = 0;
>     declaration.Padding = 0;
>  
>     return declaration;
> @@ -327,6 +328,17 @@ tgsi_build_declaration_sampler_view(unsigned texture,
>  }
>  
>  
> +static struct tgsi_declaration_array
> +tgsi_default_declaration_array( void )
> +{
> +   struct tgsi_declaration_array a;
> +
> +   a.ArrayID = 0;
> +   a.Padding = 0;
> +
> +   return a;
> +}
> +
>  struct tgsi_full_declaration
>  tgsi_default_full_declaration( void )
>  {
> @@ -338,6 +350,7 @@ tgsi_default_full_declaration( void )
>     full_declaration.Interp = tgsi_default_declaration_interp();
>     full_declaration.Resource = tgsi_default_declaration_resource();
>     full_declaration.SamplerView = tgsi_default_declaration_sampler_view();
> +   full_declaration.Array = tgsi_default_declaration_array();
>  
>     return full_declaration;
>  }
> --
> 1.7.3.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


Reviewed-by: Jose Fonseca <jfonseca at vmware.com>


More information about the mesa-dev mailing list