SWDEV-352197 - Destroy virtual device in thread destructor
Windows kills threads on exit without any notification. However, runtime can still destroy VirtualGPU object from the host thread with HostQueue destruction. This change also forces RGP trace transfer on the last capture without any delays. Change-Id: I768e87e99e1d23a021e63c12f36e450817743759
Tá an tiomantas seo le fáil i:
1 tuismitheoir
054ab2d4ae
tiomantas
ad33a021cb
4 comhad athraithe
+28
-10
Níor tháinig aon chomhaid le do chuardach
@@ -1072,15 +1072,15 @@ bool VirtualGPU::allocHsaQueueMem() {
|
||||
}
|
||||
|
||||
VirtualGPU::~VirtualGPU() {
|
||||
// Not safe to remove a queue. So lock the device
|
||||
amd::ScopedLock k(dev().lockAsyncOps());
|
||||
amd::ScopedLock lock(dev().vgpusAccess());
|
||||
|
||||
// Destroy RGP trace
|
||||
if (rgpCaptureEna()) {
|
||||
dev().rgpCaptureMgr()->FinishRGPTrace(this, true);
|
||||
}
|
||||
|
||||
// Not safe to remove a queue. So lock the device
|
||||
amd::ScopedLock k(dev().lockAsyncOps());
|
||||
amd::ScopedLock lock(dev().vgpusAccess());
|
||||
|
||||
while (!freeCbQueue_.empty()) {
|
||||
auto cb = freeCbQueue_.front();
|
||||
delete cb;
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir