From da677a438f2a9e6c2412e9962b53068716001d9e Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 24 Aug 2020 16:51:12 -0400 Subject: [PATCH] panfrost: Ensure shader-db state is zero-initialized Otherwise the next commit will invoke undefined behaviour. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Tomeu Vizoso Part-of: --- src/gallium/drivers/panfrost/pan_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 2fbb19c7d25..55f4ea667a1 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -460,7 +460,7 @@ panfrost_create_shader_state( if (unlikely((dev->debug & PAN_DBG_PRECOMPILE) && cso->type == PIPE_SHADER_IR_NIR)) { struct panfrost_context *ctx = pan_context(pctx); - struct panfrost_shader_state state; + struct panfrost_shader_state state = { 0 }; uint64_t outputs_written; panfrost_shader_compile(ctx, PIPE_SHADER_IR_NIR, -- 2.30.2