Improve OsContext construction

Change-Id: Ibf9293344cc5c0ae1b2cc011e87d9e3626f3a066
This commit is contained in:
Dunajski, Bartosz
2019-02-27 11:17:17 +01:00
committed by sys_ocldev
parent 10a25e405a
commit 86dabbf6d5
38 changed files with 227 additions and 203 deletions

View File

@@ -182,7 +182,7 @@ bool MemoryManager::isMemoryBudgetExhausted() const {
OsContext *MemoryManager::createAndRegisterOsContext(CommandStreamReceiver *commandStreamReceiver, EngineInstanceT engineType,
uint32_t numSupportedDevices, PreemptionMode preemptionMode) {
auto contextId = ++latestContextId;
auto osContext = new OsContext(executionEnvironment.osInterface.get(), contextId, numSupportedDevices, engineType, preemptionMode);
auto osContext = OsContext::create(executionEnvironment.osInterface.get(), contextId, numSupportedDevices, engineType, preemptionMode);
osContext->incRefInternal();
registeredEngines.emplace_back(commandStreamReceiver, osContext);