mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
u_trace: Indirect capture fixes
Fixes a missing sizeof parenthesis.
Fixes multiple indirects writing to the same address.
Fixes: 0a17035b5c ("u_trace: add support for indirect data")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36519>
This commit is contained in:
parent
4580293ab2
commit
78ca5ef87f
2 changed files with 7 additions and 5 deletions
|
|
@ -990,11 +990,13 @@ u_trace_appendv(struct u_trace *ut,
|
|||
tp->flags);
|
||||
|
||||
if (ut->utctx->enabled_traces & U_TRACE_TYPE_INDIRECTS) {
|
||||
uint64_t dst_offset = 0;
|
||||
for (unsigned i = 0; i < n_indirects; i++) {
|
||||
ut->utctx->capture_data(ut, cs, chunk->indirects,
|
||||
ut->utctx->max_indirect_size_bytes * tp_idx,
|
||||
addresses[i].bo, addresses[i].offset,
|
||||
indirect_sizes_B[i]);
|
||||
ut->utctx->capture_data(
|
||||
ut, cs, chunk->indirects,
|
||||
ut->utctx->max_indirect_size_bytes * tp_idx + dst_offset,
|
||||
addresses[i].bo, addresses[i].offset, indirect_sizes_B[i]);
|
||||
dst_offset += indirect_sizes_B[i];
|
||||
}
|
||||
chunk->has_indirect |= n_indirects > 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class Tracepoint(object):
|
|||
indirect_sizes = []
|
||||
for indirect in self.indirect_args:
|
||||
indirect.indirect_offset = ' + '.join(indirect_sizes) if len(indirect_sizes) > 0 else 0
|
||||
indirect_sizes.append(f"sizeof({indirect.type}")
|
||||
indirect_sizes.append(f"sizeof({indirect.type})")
|
||||
|
||||
self.tp_perfetto = tp_perfetto
|
||||
self.tp_markers = tp_markers
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue