mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 18:50:10 +01:00
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:
parent
66cc73a304
commit
edc56f944a
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue