mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 21:40:08 +01:00
ac/rgp: update dumping queue event records to the capture
GPU timestamps are emitted by the GPU to a BO with CPU-access which means the driver needs to read them back when the submission is done. Fix this by passing a pointer to that BO, like some other records. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22779>
This commit is contained in:
parent
661d28cfec
commit
aa75538674
2 changed files with 25 additions and 2 deletions
|
|
@ -1105,7 +1105,30 @@ ac_sqtt_dump_data(const struct radeon_info *rad_info, struct ac_sqtt_trace *sqtt
|
|||
/* Queue event. */
|
||||
list_for_each_entry_safe(struct rgp_queue_event_record, record,
|
||||
&rgp_queue_event->record, list) {
|
||||
fwrite(record, sizeof(struct sqtt_queue_event_record), 1, output);
|
||||
struct sqtt_queue_event_record queue_event = {
|
||||
.event_type = record->event_type,
|
||||
.sqtt_cb_id = record->sqtt_cb_id,
|
||||
.frame_index = record->frame_index,
|
||||
.queue_info_index = record->queue_info_index,
|
||||
.submit_sub_index = record->submit_sub_index,
|
||||
.api_id = record->api_id,
|
||||
.cpu_timestamp = record->cpu_timestamp,
|
||||
};
|
||||
|
||||
switch (queue_event.event_type)
|
||||
case SQTT_QUEUE_TIMING_EVENT_CMDBUF_SUBMIT: {
|
||||
queue_event.gpu_timestamps[0] = *record->gpu_timestamps[0];
|
||||
queue_event.gpu_timestamps[1] = *record->gpu_timestamps[1];
|
||||
break;
|
||||
case SQTT_QUEUE_TIMING_EVENT_PRESENT:
|
||||
queue_event.gpu_timestamps[0] = *record->gpu_timestamps[0];
|
||||
break;
|
||||
default:
|
||||
/* GPU timestamps are ignored for other queue events. */
|
||||
break;
|
||||
}
|
||||
|
||||
fwrite(&queue_event, sizeof(struct sqtt_queue_event_record), 1, output);
|
||||
}
|
||||
file_offset += (rgp_queue_event->record_count *
|
||||
sizeof(struct sqtt_queue_event_record));
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ struct rgp_queue_event_record {
|
|||
uint32_t submit_sub_index;
|
||||
uint64_t api_id;
|
||||
uint64_t cpu_timestamp;
|
||||
uint64_t gpu_timestamps[2];
|
||||
uint64_t *gpu_timestamps[2];
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue