Make OsInterface root device specific

Related-To: NEO-3857

Change-Id: Ibcd80c731b5d3755b62e0e03d0ffeedb08b52ca0
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
This commit is contained in:
Jobczyk, Lukasz
2020-01-07 07:42:40 +01:00
committed by sys_ocldev
parent 066eab2be7
commit 172e75147e
59 changed files with 432 additions and 335 deletions

View File

@@ -193,7 +193,8 @@ bool MemoryManager::isMemoryBudgetExhausted() const {
OsContext *MemoryManager::createAndRegisterOsContext(CommandStreamReceiver *commandStreamReceiver, aub_stream::EngineType engineType,
DeviceBitfield deviceBitfield, PreemptionMode preemptionMode, bool lowPriority) {
auto contextId = ++latestContextId;
auto osContext = OsContext::create(peekExecutionEnvironment().osInterface.get(), contextId, deviceBitfield, engineType, preemptionMode, lowPriority);
auto rootDeviceIndex = commandStreamReceiver ? commandStreamReceiver->getRootDeviceIndex() : 0u;
auto osContext = OsContext::create(peekExecutionEnvironment().rootDeviceEnvironments[rootDeviceIndex]->osInterface.get(), contextId, deviceBitfield, engineType, preemptionMode, lowPriority);
UNRECOVERABLE_IF(!osContext->isInitialized());
osContext->incRefInternal();