summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2012-05-23 00:02:15 -0700
committerVinson Lee <[email protected]>2012-05-23 21:58:37 -0700
commit0f6a3a7de3b56a383061635016cdb10f0229bf02 (patch)
tree3de818519404d5516487a5d7da271ad555aba26f
parent88128516d43be5d25288ff5b64db63cda83c04b3 (diff)
tgsi: Initialize Padding struct fields.
Fix uninitialized scalar variable defects report by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_build.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
index 1c24b9bdbed..cb7b9b2cccc 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.Padding = 0;
return declaration;
}
@@ -199,6 +200,7 @@ tgsi_default_declaration_interp( void )
di.Interpolate = TGSI_INTERPOLATE_CONSTANT;
di.Centroid = 0;
di.CylindricalWrap = 0;
+ di.Padding = 0;
return di;
}
@@ -215,6 +217,7 @@ tgsi_build_declaration_interp(unsigned interpolate,
di.Interpolate = interpolate;
di.Centroid = centroid;
di.CylindricalWrap = cylindrical_wrap;
+ di.Padding = 0;
declaration_grow(declaration, header);
@@ -262,6 +265,7 @@ tgsi_default_declaration_resource(void)
dr.Resource = TGSI_TEXTURE_BUFFER;
dr.Raw = 0;
dr.Writable = 0;
+ dr.Padding = 0;
return dr;
}