Correct logic in MultiRootDeviceFixture

Related-To: NEO-4589

Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2020-11-20 12:04:46 +01:00
committed by Compute-Runtime-Automation
parent 4989cf308d
commit baea633bdd
23 changed files with 102 additions and 54 deletions

View File

@@ -45,3 +45,17 @@ UltDeviceFactory::~UltDeviceFactory() {
pDevice->decRefInternal();
}
}
void NEO::UltDeviceFactory::prepareDeviceEnvironments(ExecutionEnvironment &executionEnvironment, uint32_t rootDevicesCount) {
uint32_t numRootDevices = rootDevicesCount;
executionEnvironment.prepareRootDeviceEnvironments(numRootDevices);
for (auto i = 0u; i < numRootDevices; i++) {
if (executionEnvironment.rootDeviceEnvironments[i]->getHardwareInfo() == nullptr ||
(executionEnvironment.rootDeviceEnvironments[i]->getHardwareInfo()->platform.eProductFamily == IGFX_UNKNOWN &&
executionEnvironment.rootDeviceEnvironments[i]->getHardwareInfo()->platform.eRenderCoreFamily == IGFX_UNKNOWN_CORE)) {
executionEnvironment.rootDeviceEnvironments[i]->setHwInfo(defaultHwInfo.get());
}
}
executionEnvironment.calculateMaxOsContextCount();
DeviceFactory::createMemoryManagerFunc(executionEnvironment);
}