vc4: initialize array

This fixes a (rather false) error about accessing an array that it is
uninitialized.

Fixes: 7bc39c8418 ("vc4: Add a dump-the-surface-contents routine.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4816
Cc: mesa-stable
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10918>
This commit is contained in:
Juan A. Suarez Romero
2021-05-21 12:36:23 +02:00
committed by Marge Bot
parent 789c9f764e
commit 7e767ffeb3

View File

@@ -768,7 +768,7 @@ vc4_dump_surface_non_msaa(struct pipe_surface *psurf)
uint32_t height = psurf->height;
uint32_t chunk_w = width / 79;
uint32_t chunk_h = height / 40;
uint32_t found_colors[10];
uint32_t found_colors[10] = { 0 };
uint32_t num_found_colors = 0;
if (rsc->vc4_format != VC4_TEXTURE_TYPE_RGBA32R) {