From 530a32bb9593704cec291b613e75b91ecdfd6aa4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 17 Nov 2020 12:24:01 -0800 Subject: [PATCH] freedreno/a6xx: Fix use of uninitialized img->level in the SSBO/image path. I think enough things lined up that the uninitialized level in the buffer paths would end effectively not being used (no ubwc, not tiling anyway), but let's just zero-init it to be sure and quiet the compiler. Reviewed-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_image.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_image.c b/src/gallium/drivers/freedreno/a6xx/fd6_image.c index 128a15ef21b..1639a6bcf10 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_image.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_image.c @@ -91,6 +91,7 @@ static void translate_image(struct fd6_image *img, const struct pipe_image_view img->width = sz & MASK(15); img->height = sz >> 15; img->depth = 0; + img->level = 0; } else { img->buffer = false; @@ -155,6 +156,7 @@ static void translate_buf(struct fd6_image *img, const struct pipe_shader_buffer img->offset = pimg->buffer_offset; img->pitch = 0; img->array_pitch = 0; + img->level = 0; /* size is encoded with low 15b in WIDTH and high bits in HEIGHT, * in units of elements: