mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
fix: make initializeEngine() thread-safe
Related-To: NEO-15630 Signed-off-by: Jakub Nowacki <jakub.nowacki@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
41a63a0907
commit
a5025edc20
@@ -129,11 +129,13 @@ void TbxCommandStreamReceiverHw<GfxFamily>::protectCPUMemoryFromWritesIfTbxFault
|
||||
|
||||
template <typename GfxFamily>
|
||||
void TbxCommandStreamReceiverHw<GfxFamily>::initializeEngine() {
|
||||
isEngineInitialized = true;
|
||||
if (!isEngineInitialized) {
|
||||
isEngineInitialized = true;
|
||||
|
||||
if (hardwareContextController) {
|
||||
hardwareContextController->initialize();
|
||||
return;
|
||||
if (hardwareContextController) {
|
||||
hardwareContextController->initialize();
|
||||
return;
|
||||
}
|
||||
}
|
||||
DEBUG_BREAK_IF(this->aubManager);
|
||||
}
|
||||
@@ -270,9 +272,7 @@ bool TbxCommandStreamReceiverHw<GfxFamily>::writeMemory(GraphicsAllocation &gfxA
|
||||
|
||||
this->protectCPUMemoryFromWritesIfTbxFaultable(&gfxAllocation, cpuAddress, size);
|
||||
|
||||
if (!isEngineInitialized) {
|
||||
initializeEngine();
|
||||
}
|
||||
initializeEngine();
|
||||
|
||||
if (aubManager) {
|
||||
this->writeMemoryWithAubManager(gfxAllocation, isChunkCopy, gpuVaChunkOffset, chunkSize);
|
||||
|
||||
Reference in New Issue
Block a user