tgsi: fix uninitialized declaration array fields
authorBrian Paul <brianp@vmware.com>
Tue, 19 Mar 2013 19:49:42 +0000 (13:49 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 19 Mar 2013 21:15:37 +0000 (15:15 -0600)
Fixes a few regressions since the TGSI array changes.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_build.c

index 435d94a2103fd5b49fbc6d4ed972dac38b97e45d..509bc5c1241d6f0a462e185a32b20c412325b176 100644 (file)
@@ -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;
 }