zink: Initialize pipe_query_result

Avoid reading garbage from memory.

Found by the clang static analyzer

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27259>
This commit is contained in:
Corentin Noël 2024-01-25 11:44:30 +01:00 committed by Marge Bot
parent 66cc73a304
commit edc56f944a

View file

@ -724,7 +724,7 @@ force_cpu_read(struct zink_context *ctx, struct pipe_query *pquery, enum pipe_qu
struct pipe_context *pctx = &ctx->base;
unsigned result_size = result_type <= PIPE_QUERY_TYPE_U32 ? sizeof(uint32_t) : sizeof(uint64_t);
struct zink_query *query = (struct zink_query*)pquery;
union pipe_query_result result;
union pipe_query_result result = {0};
if (query->needs_update)
update_qbo(ctx, query);