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@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5120>
* 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);