From: Alyssa Rosenzweig Date: Mon, 24 Aug 2020 20:51:12 +0000 (-0400) Subject: panfrost: Ensure shader-db state is zero-initialized X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=commitdiff_plain;h=da677a438f2a9e6c2412e9962b53068716001d9e 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: --- 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,