From b2db2e3f33d375da982167f96bbe9cc6792d399e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ADra=20Canal?= Date: Tue, 12 Dec 2023 20:41:49 -0300 Subject: [PATCH] v3dv: don't start iterating performance queries at zero MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, the function handle_reset_query_cpu_job() starts to iterate between the performance queries in the zero-index. This is not correct, as we should start iterating the performance queries at first, which is a index indicated by info->first. Signed-off-by: MaĆ­ra Canal Reviewed-by: Iago Toral Quiroga Part-of: --- src/broadcom/vulkan/v3dv_queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/broadcom/vulkan/v3dv_queue.c b/src/broadcom/vulkan/v3dv_queue.c index 3c7367846fc..0503782e877 100644 --- a/src/broadcom/vulkan/v3dv_queue.c +++ b/src/broadcom/vulkan/v3dv_queue.c @@ -398,13 +398,13 @@ handle_reset_query_cpu_job(struct v3dv_queue *queue, struct vk_sync_wait waits[info->count]; unsigned wait_count = 0; for (int i = 0; i < info->count; i++) { - struct v3dv_query *query = &info->pool->queries[i]; + struct v3dv_query *query = &info->pool->queries[info->first + i]; /* Only wait for a query if we've used it otherwise we will be * waiting forever for the fence to become signaled. */ if (query->maybe_available) { waits[wait_count] = (struct vk_sync_wait){ - .sync = info->pool->queries[i].perf.last_job_sync + .sync = query->perf.last_job_sync }; wait_count++; };