mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
Reduce usage of global gfx core helper getter [2/n]
Related-To: NEO-6853 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ca14e411e4
commit
ecea487cf0
@@ -168,7 +168,8 @@ bool isBcsEnabled(const HardwareInfo &hwInfo, aub_stream::EngineType engineType)
|
||||
}
|
||||
|
||||
bool linkCopyEnginesSupported(const HardwareInfo &hwInfo, const DeviceBitfield &deviceBitfield) {
|
||||
const aub_stream::EngineType engine1 = GfxCoreHelper::get(hwInfo.platform.eRenderCoreFamily).isSubDeviceEngineSupported(hwInfo, deviceBitfield, aub_stream::ENGINE_BCS1)
|
||||
auto &gfxCoreHelper = GfxCoreHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
const aub_stream::EngineType engine1 = gfxCoreHelper.isSubDeviceEngineSupported(hwInfo, deviceBitfield, aub_stream::ENGINE_BCS1)
|
||||
? aub_stream::ENGINE_BCS1
|
||||
: aub_stream::ENGINE_BCS4;
|
||||
const aub_stream::EngineType engine2 = aub_stream::ENGINE_BCS2;
|
||||
@@ -177,6 +178,7 @@ bool linkCopyEnginesSupported(const HardwareInfo &hwInfo, const DeviceBitfield &
|
||||
}
|
||||
|
||||
aub_stream::EngineType selectLinkCopyEngine(const HardwareInfo &hwInfo, const DeviceBitfield &deviceBitfield, std::atomic<uint32_t> &selectorCopyEngine) {
|
||||
auto &gfxCoreHelper = GfxCoreHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
auto enableCmdQRoundRobindBcsEngineAssign = false;
|
||||
|
||||
if (DebugManager.flags.EnableCmdQRoundRobindBcsEngineAssign.get() != -1) {
|
||||
@@ -216,14 +218,14 @@ aub_stream::EngineType selectLinkCopyEngine(const HardwareInfo &hwInfo, const De
|
||||
engineType = static_cast<aub_stream::EngineType>(aub_stream::EngineType::ENGINE_BCS1 + selectEngineValue);
|
||||
}
|
||||
|
||||
} while (!GfxCoreHelper::get(hwInfo.platform.eRenderCoreFamily).isSubDeviceEngineSupported(hwInfo, deviceBitfield, engineType) || !hwInfo.featureTable.ftrBcsInfo.test(engineType == aub_stream::EngineType::ENGINE_BCS
|
||||
? 0
|
||||
: engineType - aub_stream::EngineType::ENGINE_BCS1 + 1));
|
||||
} while (!gfxCoreHelper.isSubDeviceEngineSupported(hwInfo, deviceBitfield, engineType) || !hwInfo.featureTable.ftrBcsInfo.test(engineType == aub_stream::EngineType::ENGINE_BCS
|
||||
? 0
|
||||
: engineType - aub_stream::EngineType::ENGINE_BCS1 + 1));
|
||||
|
||||
return engineType;
|
||||
}
|
||||
|
||||
const aub_stream::EngineType engine1 = GfxCoreHelper::get(hwInfo.platform.eRenderCoreFamily).isSubDeviceEngineSupported(hwInfo, deviceBitfield, aub_stream::ENGINE_BCS1)
|
||||
const aub_stream::EngineType engine1 = gfxCoreHelper.isSubDeviceEngineSupported(hwInfo, deviceBitfield, aub_stream::ENGINE_BCS1)
|
||||
? aub_stream::ENGINE_BCS1
|
||||
: aub_stream::ENGINE_BCS4;
|
||||
const aub_stream::EngineType engine2 = aub_stream::ENGINE_BCS2;
|
||||
|
||||
Reference in New Issue
Block a user