v3dv: account for dst offset of copy query results operations
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 7 Jul 2021 09:52:17 +0000 (11:52 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 7 Jul 2021 10:41:06 +0000 (10:41 +0000)
This fixes several CTS tests with this pattern:
  dEQP-VK.query_pool.occlusion_query.copy_results*dstoffset

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11758>

src/broadcom/vulkan/v3dv_queue.c

index b72aff3..11a2585 100644 (file)
@@ -223,11 +223,13 @@ handle_copy_query_results_cpu_job(struct v3dv_job *job)
     * sync wait on the CPU for the corresponding GPU jobs to finish. We might
     * want to use a submission thread to avoid blocking on the main thread.
     */
+   uint8_t *offset = ((uint8_t *) bo->map) +
+                     info->offset + info->dst->mem_offset;
    v3dv_get_query_pool_results_cpu(job->device,
                                    info->pool,
                                    info->first,
                                    info->count,
-                                   bo->map + info->dst->mem_offset,
+                                   offset,
                                    info->stride,
                                    info->flags);