Debug variable must override HardwareInfo capability at DeviceFactory

RT must override engineType at DeviceFactory, since Wddm CSR uses HardwareInfo
at its ctor.
AUB tests must override engineType at Device ctor since they bypass
DeviceFactory.

Change-Id: I73e4066e9b16aed0410fe39a82726d3baea2e67f
This commit is contained in:
Zdanowicz, Zbigniew
2018-02-14 14:52:00 +01:00
committed by sys_ocldev
parent 4e6fe62eb6
commit 8a5b0ee518
3 changed files with 23 additions and 0 deletions

View File

@@ -167,6 +167,10 @@ int HwInfoConfig::configureHwInfo(const HardwareInfo *inHwInfo, HardwareInfo *ou
hwHelper.setCapabilityCoherencyFlag(const_cast<const HardwareInfo *>(outHwInfo), platformCoherency);
outHwInfo->capabilityTable.ftrSupportsCoherency = (platformCoherency && drm->peekCoherencyDisablePatchActive());
outHwInfo->capabilityTable.defaultEngineType = DebugManager.flags.NodeOrdinal.get() == -1
? outHwInfo->capabilityTable.defaultEngineType
: static_cast<EngineType>(DebugManager.flags.NodeOrdinal.get());
outHwInfo->capabilityTable.instrumentationEnabled = false;
outHwInfo->capabilityTable.ftrCompression = false;

View File

@@ -71,6 +71,9 @@ bool DeviceFactory::getDevices(HardwareInfo **pHWInfos, size_t &numDevices) {
HwHelper &hwHelper = HwHelper::get(adapterInfo->GfxPlatform.eRenderCoreFamily);
hwHelper.adjustDefaultEngineType(&tempHwInfos[devNum]);
tempHwInfos[devNum].capabilityTable.defaultEngineType = DebugManager.flags.NodeOrdinal.get() == -1
? tempHwInfos[devNum].capabilityTable.defaultEngineType
: static_cast<EngineType>(DebugManager.flags.NodeOrdinal.get());
hwHelper.setCapabilityCoherencyFlag(&tempHwInfos[devNum], tempHwInfos[devNum].capabilityTable.ftrSupportsCoherency);