Skip to content
Snippets Groups Projects
Commit e8d5e82e authored by WuZhen's avatar WuZhen Committed by Emil Velikov
Browse files

tgsi: initialize stack allocated struct


Cc: "11.2 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: default avatarChih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 798f7a85)
parent 0a27c07d
No related branches found
No related tags found
No related merge requests found
......@@ -432,6 +432,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;
......@@ -480,6 +481,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;
......@@ -511,6 +513,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;
......@@ -671,6 +674,7 @@ tgsi_dump_instruction(
uint instno )
{
struct dump_ctx ctx;
memset(&ctx, 0, sizeof(ctx));
ctx.instno = instno;
ctx.immno = instno;
......@@ -696,6 +700,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;
......@@ -766,6 +771,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;
......@@ -805,6 +811,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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment