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 <yusisamerican@gmail.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29411>
This commit is contained in:
Yusuf Khan
2024-05-27 03:19:10 -05:00
committed by Marge Bot
parent 62c8e58f39
commit 42ee8d80d9

View File

@@ -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 */