Mesa (master): zink: fix vkCmdResetQueryPool usage
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri May 22 13:38:24 UTC 2020
Module: Mesa
Branch: master
Commit: 3933747d87680a3432814aa51f2f5231b2f1ed60
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3933747d87680a3432814aa51f2f5231b2f1ed60
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Wed May 20 09:52:24 2020 -0400
zink: fix vkCmdResetQueryPool usage
the final parameter here is the number of queries to reset, not the
index of the last query, meaning that the value passed needs to be
(curr_query + 1) in order to reset the query corresponding to
curr_query
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5120>
---
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 3f8c640ae65..8f06256bf5b 100644
--- a/src/gallium/drivers/zink/zink_query.c
+++ b/src/gallium/drivers/zink/zink_query.c
@@ -132,7 +132,7 @@ zink_begin_query(struct pipe_context *pctx,
* the pool in the batch instead?
*/
struct zink_batch *batch = zink_batch_no_rp(zink_context(pctx));
- vkCmdResetQueryPool(batch->cmdbuf, query->query_pool, 0, query->curr_query);
+ vkCmdResetQueryPool(batch->cmdbuf, query->query_pool, 0, MIN2(query->curr_query + 1, query->num_queries));
query->curr_query = 0;
begin_query(ctx, query);
More information about the mesa-commit
mailing list