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>
This commit is contained in:
@@ -437,6 +437,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;
|
||||
|
||||
@@ -485,6 +486,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;
|
||||
|
||||
@@ -516,6 +518,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;
|
||||
|
||||
@@ -684,6 +687,7 @@ tgsi_dump_instruction(
|
||||
uint instno )
|
||||
{
|
||||
struct dump_ctx ctx;
|
||||
memset(&ctx, 0, sizeof(ctx));
|
||||
|
||||
ctx.instno = instno;
|
||||
ctx.immno = instno;
|
||||
@@ -724,6 +728,7 @@ void
|
||||
tgsi_dump_to_file(const struct tgsi_token *tokens, uint flags, FILE *file)
|
||||
{
|
||||
struct dump_ctx ctx;
|
||||
memset(&ctx, 0, sizeof(ctx));
|
||||
|
||||
init_dump_ctx(&ctx, flags);
|
||||
|
||||
@@ -782,6 +787,7 @@ tgsi_dump_str(
|
||||
size_t size)
|
||||
{
|
||||
struct str_dump_ctx ctx;
|
||||
memset(&ctx, 0, sizeof(ctx));
|
||||
|
||||
init_dump_ctx(&ctx.base, flags);
|
||||
|
||||
@@ -806,6 +812,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;
|
||||
|
Reference in New Issue
Block a user