Mesa (main): zink: force queries to start/end out of renderpass
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 3 01:22:19 UTC 2022
Module: Mesa
Branch: main
Commit: d9ab27944d800d84296ded8489349d3240f0d2da
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d9ab27944d800d84296ded8489349d3240f0d2da
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Thu Jun 2 14:04:04 2022 -0400
zink: force queries to start/end out of renderpass
spec requires queries to either start and end in the same renderpass
or start and end outside of renderpass, so do the latter since it's
easier to track
cc: mesa-stable
fixes #6579
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16844>
---
src/gallium/drivers/zink/zink_query.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c
index 9d955c2dd1c..2c560b12671 100644
--- a/src/gallium/drivers/zink/zink_query.c
+++ b/src/gallium/drivers/zink/zink_query.c
@@ -888,6 +888,15 @@ zink_begin_query(struct pipe_context *pctx,
query->last_start_idx = get_num_starts(query);
+ /* A query must either begin and end inside the same subpass of a render pass
+ instance, or must both begin and end outside of a render pass instance
+ (i.e. contain entire render pass instances).
+ - 18.2. Query Operation
+
+ * tilers prefer out-of-renderpass queries for perf reasons, so force all queries
+ * out of renderpasses
+ */
+ zink_batch_no_rp(ctx);
begin_query(ctx, batch, query);
return true;
@@ -968,6 +977,7 @@ zink_end_query(struct pipe_context *pctx,
/* FIXME: this can be called from a thread, but it needs to write to the cmdbuf */
threaded_context_unwrap_sync(pctx);
+ zink_batch_no_rp(ctx);
if (needs_stats_list(query))
list_delinit(&query->stats_list);
More information about the mesa-commit
mailing list