From 418ca5dc1ac01045818ad3222d2e0bc51dc2e904 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 4 Feb 2020 14:24:44 -0500 Subject: [PATCH] panfrost: Ensure compute shader_meta is zeroed In theory the hardware doesn't care but it'll make for easier traces. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_compute.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/pan_compute.c b/src/gallium/drivers/panfrost/pan_compute.c index 9e3306b673f..56bac7a8523 100644 --- a/src/gallium/drivers/panfrost/pan_compute.c +++ b/src/gallium/drivers/panfrost/pan_compute.c @@ -52,7 +52,8 @@ panfrost_create_compute_state( so->variant_count = 1; so->active_variant = 0; - v->tripipe = malloc(sizeof(struct mali_shader_meta)); + /* calloc, instead of malloc - to zero unused fields */ + v->tripipe = CALLOC_STRUCT(mali_shader_meta); if (cso->ir_type == PIPE_SHADER_IR_NIR_SERIALIZED) { struct blob_reader reader; -- 2.30.2