Improve HardwareContextController creation

Change-Id: Iba929a2b4fcd993b38dd674be578aad0a481e8de
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2019-03-05 18:50:10 +01:00
committed by sys_ocldev
parent e721f7c08c
commit f24b428cf7
14 changed files with 66 additions and 71 deletions

View File

@@ -14,17 +14,17 @@
namespace OCLRT {
OsContext *OsContext::create(OSInterface *osInterface, uint32_t contextId, uint32_t numDevicesSupported,
OsContext *OsContext::create(OSInterface *osInterface, uint32_t contextId, uint32_t deviceBitfiled,
EngineInstanceT engineType, PreemptionMode preemptionMode) {
if (osInterface) {
return new OsContextLinux(*osInterface->get()->getDrm(), contextId, numDevicesSupported, engineType, preemptionMode);
return new OsContextLinux(*osInterface->get()->getDrm(), contextId, deviceBitfiled, engineType, preemptionMode);
}
return new OsContext(contextId, numDevicesSupported, engineType, preemptionMode);
return new OsContext(contextId, deviceBitfiled, engineType, preemptionMode);
}
OsContextLinux::OsContextLinux(Drm &drm, uint32_t contextId, uint32_t numDevicesSupported,
OsContextLinux::OsContextLinux(Drm &drm, uint32_t contextId, uint32_t deviceBitfiled,
EngineInstanceT engineType, PreemptionMode preemptionMode)
: OsContext(contextId, numDevicesSupported, engineType, preemptionMode), drm(drm) {
: OsContext(contextId, deviceBitfiled, engineType, preemptionMode), drm(drm) {
engineFlag = DrmEngineMapper::engineNodeMap(engineType.type);
this->drmContextId = drm.createDrmContext();