aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-02-04 14:24:44 -0500
committerAlyssa Rosenzweig <[email protected]>2020-02-16 09:16:46 -0500
commit418ca5dc1ac01045818ad3222d2e0bc51dc2e904 (patch)
treef4d272062a481eb203a5cfaf21ea70b9ed9e4109 /src/gallium/drivers/panfrost
parent058faf5a4bd448e1c188042ea017f8fbfd565b9e (diff)
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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
Diffstat (limited to 'src/gallium/drivers/panfrost')
-rw-r--r--src/gallium/drivers/panfrost/pan_compute.c3
1 files changed, 2 insertions, 1 deletions
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;