Module: Mesa
Branch: main
Commit: f1ab070d7f20423113e8d6aae75a4d153ae93e07
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f1ab070d7f20423113e8d6aae75a4d153ae93e07

Author: Lionel Landwerlin <[email protected]>
Date:   Sun May 22 17:15:50 2022 +0300

intel/ds: move event_id access to perfetto lambda

Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Emma Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16655>

---

 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);

Reply via email to