From b103855abce003cf8bd236bf6d11253af5404e72 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Wed, 7 Jul 2021 11:52:17 +0200 Subject: [PATCH] v3dv: account for dst offset of copy query results operations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes several CTS tests with this pattern: dEQP-VK.query_pool.occlusion_query.copy_results*dstoffset Reviewed-by: Alejandro PiƱeiro Part-of: --- src/broadcom/vulkan/v3dv_queue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/broadcom/vulkan/v3dv_queue.c b/src/broadcom/vulkan/v3dv_queue.c index b72aff33e26..11a2585ee6e 100644 --- a/src/broadcom/vulkan/v3dv_queue.c +++ b/src/broadcom/vulkan/v3dv_queue.c @@ -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);