diff --git a/.pick_status.json b/.pick_status.json index d90727b213b..cc540a23db1 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -319,7 +319,7 @@ "description": "lavapipe: use the passed offset for CmdCopyQueryPoolResults", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "b38879f8c5f57b7f1802e433e33181bdf5e72aef" }, diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c index f882de5b118..cc6ded77382 100644 --- a/src/gallium/frontends/lavapipe/lvp_execute.c +++ b/src/gallium/frontends/lavapipe/lvp_execute.c @@ -2096,7 +2096,7 @@ static void handle_copy_query_pool_results(struct lvp_cmd_buffer_entry *cmd, struct lvp_query_pool *pool = copycmd->pool; for (unsigned i = copycmd->first_query; i < copycmd->first_query + copycmd->query_count; i++) { - unsigned offset = copycmd->dst->offset + (copycmd->stride * (i - copycmd->first_query)); + unsigned offset = copycmd->dst_offset + copycmd->dst->offset + (copycmd->stride * (i - copycmd->first_query)); if (pool->queries[i]) { if (copycmd->flags & VK_QUERY_RESULT_WITH_AVAILABILITY_BIT) state->pctx->get_query_result_resource(state->pctx, @@ -2119,8 +2119,9 @@ static void handle_copy_query_pool_results(struct lvp_cmd_buffer_entry *cmd, struct pipe_transfer *src_t; uint32_t *map; - struct pipe_box box = {}; - box.width = copycmd->stride * copycmd->query_count; + struct pipe_box box = {0}; + box.x = offset; + box.width = copycmd->stride; box.height = 1; box.depth = 1; map = state->pctx->transfer_map(state->pctx,