anv: fix timestamp copies from secondary buffers

We increased the size of the timestamps but only copied 64bit values
from the secondaries.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 521c216efc ("anv: use COMPUTE_WALKER post sync field to track compute work")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29438>
This commit is contained in:
Lionel Landwerlin
2024-05-28 17:39:55 +03:00
committed by Marge Bot
parent 1511b25b0f
commit 1d4e56d22a
3 changed files with 11 additions and 3 deletions

View File

@@ -1815,6 +1815,10 @@ struct anv_device {
struct anv_bo_pool batch_bo_pool;
/** Memory pool for utrace timestamp buffers */
struct anv_bo_pool utrace_bo_pool;
/**
* Size of the timestamp captured for utrace.
*/
uint32_t utrace_timestamp_size;
/** Memory pool for BVH build buffers */
struct anv_bo_pool bvh_bo_pool;

View File

@@ -509,6 +509,8 @@ anv_device_utrace_init(struct anv_device *device)
intel_engines_class_to_string(queue->family->engine_class),
queue->vk.index_in_family);
}
device->utrace_timestamp_size = sizeof(union anv_utrace_timestamp);
}
void

View File

@@ -3181,14 +3181,16 @@ cmd_buffer_emit_copy_ts_buffer(struct u_trace_context *utctx,
void *ts_to, uint32_t to_offset,
uint32_t count)
{
struct anv_device *device =
container_of(utctx, struct anv_device, ds.trace_context);
struct anv_memcpy_state *memcpy_state = cmdstream;
struct anv_address from_addr = (struct anv_address) {
.bo = ts_from, .offset = from_offset * sizeof(uint64_t) };
.bo = ts_from, .offset = from_offset * device->utrace_timestamp_size };
struct anv_address to_addr = (struct anv_address) {
.bo = ts_to, .offset = to_offset * sizeof(uint64_t) };
.bo = ts_to, .offset = to_offset * device->utrace_timestamp_size };
genX(emit_so_memcpy)(memcpy_state, to_addr, from_addr,
count * sizeof(uint64_t));
count * device->utrace_timestamp_size);
}
void