From 42ee8d80d97b79e69c51582af3ae1ace2e49e0ce Mon Sep 17 00:00:00 2001 From: Yusuf Khan Date: Mon, 27 May 2024 03:19:10 -0500 Subject: [PATCH] zink/query: begin time elapsed queries even if we arent in a rp If we arent in a renderpass, but still wanna start the time elapsed query(eg. to figure out how long some random operation will take) then this seems to fix that case. Signed-off-by: Yusuf Khan cc: mesa-stable Part-of: --- src/gallium/drivers/zink/zink_query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c index 41b147b9794..9060c0cae6f 100644 --- a/src/gallium/drivers/zink/zink_query.c +++ b/src/gallium/drivers/zink/zink_query.c @@ -976,7 +976,7 @@ zink_begin_query(struct pipe_context *pctx, util_dynarray_clear(&query->starts); query->start_offset = 0; - if (ctx->in_rp) { + if (ctx->in_rp || (query->type == PIPE_QUERY_TIME_ELAPSED)) { begin_query(ctx, query); } else { /* never directly start queries out of renderpass, always defer */