From: Alyssa Rosenzweig Date: Tue, 4 Feb 2020 19:24:44 +0000 (-0500) Subject: panfrost: Ensure compute shader_meta is zeroed X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=418ca5dc1ac01045818ad3222d2e0bc51dc2e904;p=mesa.git 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: --- 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;