mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-07 21:27:04 +08:00
Add lock to downloading allocations on tbx
When running multiple threads, one thread could clear allocationsForDownload while another was iterating over it. Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
60d6505932
commit
e0c892ed55
@@ -485,6 +485,7 @@ void TbxCommandStreamReceiverHw<GfxFamily>::flushSubmissionsAndDownloadAllocatio
|
||||
pollAddress = ptrOffset(pollAddress, this->postSyncWriteOffset);
|
||||
}
|
||||
|
||||
auto lockCSR = this->obtainUniqueOwnership();
|
||||
for (GraphicsAllocation *graphicsAllocation : this->allocationsForDownload) {
|
||||
downloadAllocation(*graphicsAllocation);
|
||||
}
|
||||
@@ -555,6 +556,7 @@ void TbxCommandStreamReceiverHw<GfxFamily>::downloadAllocations() {
|
||||
}
|
||||
pollAddress = ptrOffset(pollAddress, this->postSyncWriteOffset);
|
||||
}
|
||||
auto lockCSR = this->obtainUniqueOwnership();
|
||||
for (GraphicsAllocation *graphicsAllocation : this->allocationsForDownload) {
|
||||
downloadAllocation(*graphicsAllocation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user