mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-31 20:13:04 +08:00
Improve HardwareContextController creation
Change-Id: Iba929a2b4fcd993b38dd674be578aad0a481e8de Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
e721f7c08c
commit
f24b428cf7
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user