summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuZhen <wuzhen@jidemail.com>2016-04-28 15:34:55 +0800
committerEmil Velikov <emil.l.velikov@gmail.com>2016-05-05 11:47:53 +0100
commit4a5fa6d20cb2e3e67b274b185dadcec5b27d594d (patch)
treed02d6e7fd75e6247c759db200ed2dc2a5fe3d410
parent970941fa86fe763212ad64d5a99ea90fd40457cb (diff)
tgsi: initialize stack allocated struct
Cc: "11.2 11.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit 798f7a8596e3ff3f57a44812d7fd005f53f5557c)
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_dump.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
index e29ffb39894..1252bc4dc10 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -420,6 +420,7 @@ tgsi_dump_declaration(
const struct tgsi_full_declaration *decl )
{
struct dump_ctx ctx;
+ memset(&ctx, 0, sizeof(ctx));
ctx.dump_printf = dump_ctx_printf;
@@ -468,6 +469,7 @@ void tgsi_dump_property(
const struct tgsi_full_property *prop )
{
struct dump_ctx ctx;
+ memset(&ctx, 0, sizeof(ctx));
ctx.dump_printf = dump_ctx_printf;
@@ -499,6 +501,7 @@ tgsi_dump_immediate(
const struct tgsi_full_immediate *imm )
{
struct dump_ctx ctx;
+ memset(&ctx, 0, sizeof(ctx));
ctx.dump_printf = dump_ctx_printf;
@@ -649,6 +652,7 @@ tgsi_dump_instruction(
uint instno )
{
struct dump_ctx ctx;
+ memset(&ctx, 0, sizeof(ctx));
ctx.instno = instno;
ctx.immno = instno;
@@ -674,6 +678,7 @@ void
tgsi_dump_to_file(const struct tgsi_token *tokens, uint flags, FILE *file)
{
struct dump_ctx ctx;
+ memset(&ctx, 0, sizeof(ctx));
ctx.iter.prolog = prolog;
ctx.iter.iterate_instruction = iter_instruction;
@@ -744,6 +749,7 @@ tgsi_dump_str(
size_t size)
{
struct str_dump_ctx ctx;
+ memset(&ctx, 0, sizeof(ctx));
ctx.base.iter.prolog = prolog;
ctx.base.iter.iterate_instruction = iter_instruction;
@@ -783,6 +789,7 @@ tgsi_dump_instruction_str(
size_t size)
{
struct str_dump_ctx ctx;
+ memset(&ctx, 0, sizeof(ctx));
ctx.base.instno = instno;
ctx.base.immno = instno;