SWDEV-440746 - Fix a crash during RGP capture

With multiple HIP streams it's possible to have a race condition when
one thread stops the traces, but another still performs submisisons.
That may cause a crash on the barrier callback.

Change-Id: Ic56f8277fcfd2c2142a4821d927b938b9f313add
Cette révision appartient à :
German Andryeyev
2024-02-22 18:21:14 -05:00
révisé par Chiranjeevi Pattigidi
Parent 4177b4b675
révision e2d2fad56c
+6 -3
Voir le fichier
@@ -874,7 +874,9 @@ void RgpCaptureMgr::WriteBarrierStartMarker(const VirtualGPU* gpu,
RgpSqttMarkerBarrierStart marker = {};
marker.identifier = RgpSqttMarkerIdentifierBarrierStart;
marker.cbId = trace_.begin_queue_->queue(MainEngine).cmdBufId();
if (trace_.begin_queue_ != nullptr) {
marker.cbId = trace_.begin_queue_->queue(MainEngine).cmdBufId();
}
marker.dword02 = data.reason;
marker.internal = true;
@@ -898,8 +900,9 @@ void RgpCaptureMgr::WriteBarrierEndMarker(const VirtualGPU* gpu,
RgpSqttMarkerBarrierEnd marker = {};
marker.identifier = RgpSqttMarkerIdentifierBarrierEnd;
marker.cbId = trace_.begin_queue_->queue(MainEngine).cmdBufId();
if (trace_.begin_queue_ != nullptr) {
marker.cbId = trace_.begin_queue_->queue(MainEngine).cmdBufId();
}
marker.waitOnEopTs = operations.pipelineStalls.eopTsBottomOfPipe;
marker.vsPartialFlush = operations.pipelineStalls.vsPartialFlush;
marker.psPartialFlush = operations.pipelineStalls.psPartialFlush;