v3dv: don't start iterating performance queries at zero

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 <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
This commit is contained in:
Maíra Canal 2023-12-12 20:41:49 -03:00 committed by Marge Bot
parent 6089982a82
commit b2db2e3f33

View file

@ -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++;
};