From f1ab070d7f20423113e8d6aae75a4d153ae93e07 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Sun, 22 May 2022 17:15:50 +0300 Subject: [PATCH] intel/ds: move event_id access to perfetto lambda Signed-off-by: Lionel Landwerlin Reviewed-by: Emma Anholt Part-of: --- src/intel/ds/intel_driver_ds.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/ds/intel_driver_ds.cc b/src/intel/ds/intel_driver_ds.cc index c8efb8fdb1d..42e2b69e530 100644 --- a/src/intel/ds/intel_driver_ds.cc +++ b/src/intel/ds/intel_driver_ds.cc @@ -299,7 +299,6 @@ end_event(struct intel_ds_queue *queue, uint64_t ts_ns, if (!start_ns) return; - uint64_t evt_id = device->event_id++; IntelRenderpassDataSource::Trace([=](IntelRenderpassDataSource::TraceContext tctx) { if (auto state = tctx.GetIncrementalState(); state->was_cleared) { @@ -309,6 +308,8 @@ end_event(struct intel_ds_queue *queue, uint64_t ts_ns, sync_timestamp(tctx, queue->device); + uint64_t evt_id = device->event_id++; + auto packet = tctx.NewTracePacket(); packet->set_timestamp(start_ns);