u_trace: extend tracepoint end_of_pipe bit into flags
We ran into an issue with Intel drivers where it became tricky to tell whether a timestamp must be recorded with a special end-of-pipe compute instruction or something else. We initially tried to deal with that internally by checking some state in the command buffers but turns out it doesn't work. This change adds a flag field to the tracepoint to have that information there and the flags are passed to the record_ts vfunc. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29438>
This commit is contained in:
committed by
Marge Bot
parent
265b2b1255
commit
3984875792
@@ -224,7 +224,7 @@ anv_utrace_destroy_ts_buffer(struct u_trace_context *utctx, void *timestamps)
|
||||
static void
|
||||
anv_utrace_record_ts(struct u_trace *ut, void *cs,
|
||||
void *timestamps, unsigned idx,
|
||||
bool end_of_pipe)
|
||||
uint32_t flags)
|
||||
{
|
||||
struct anv_cmd_buffer *cmd_buffer =
|
||||
container_of(ut, struct anv_cmd_buffer, trace);
|
||||
@@ -232,8 +232,9 @@ anv_utrace_record_ts(struct u_trace *ut, void *cs,
|
||||
struct anv_bo *bo = timestamps;
|
||||
|
||||
enum anv_timestamp_capture_type capture_type =
|
||||
(end_of_pipe) ? ANV_TIMESTAMP_CAPTURE_END_OF_PIPE
|
||||
: ANV_TIMESTAMP_CAPTURE_TOP_OF_PIPE;
|
||||
(flags & INTEL_DS_TRACEPOINT_FLAG_END_OF_PIPE) ?
|
||||
ANV_TIMESTAMP_CAPTURE_END_OF_PIPE :
|
||||
ANV_TIMESTAMP_CAPTURE_TOP_OF_PIPE;
|
||||
device->physical->cmd_emit_timestamp(&cmd_buffer->batch, device,
|
||||
(struct anv_address) {
|
||||
.bo = bo,
|
||||
|
||||
Reference in New Issue
Block a user