4
0
mirror of https://github.com/revyos-package/mesa.git synced 2026-04-28 09:13:36 +00:00

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>
(cherry picked from commit 1d4e56d22a6525484a4e4593173febc93855b116)
This commit is contained in:
Lionel Landwerlin
2024-05-28 17:39:55 +03:00
committed by Eric Engestrom
parent 00f95905b2
commit 6b7a7dbee3
4 changed files with 12 additions and 4 deletions

View File

@@ -1164,7 +1164,7 @@
"description": "anv: fix timestamp copies from secondary buffers",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "521c216efcc0d0292ceedb3451c5a0a1ef956083",
"notes": null

View File

@@ -1667,6 +1667,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

@@ -499,6 +499,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

@@ -3713,14 +3713,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