svga: Clear query before usage

Fixes the following compiler warning:
  svga_pipe_query.c:1295:17: warning: 'result.u64' may be used uninitialized [-Werror=maybe-uninitialized]

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17121>
This commit is contained in:
Christian Gmeiner 2022-06-18 19:04:24 +02:00 committed by Marge Bot
parent d4922c0dfb
commit 37b4c8dbca
1 changed files with 1 additions and 0 deletions

View File

@ -1287,6 +1287,7 @@ svga_get_timestamp(struct pipe_context *pipe)
struct pipe_query *q = svga_create_query(pipe, PIPE_QUERY_TIMESTAMP, 0);
union pipe_query_result result;
util_query_clear_result(&result, PIPE_QUERY_TIMESTAMP);
svga_begin_query(pipe, q);
svga_end_query(pipe,q);
svga_get_query_result(pipe, q, TRUE, &result);