diff --git a/shared/source/helpers/gfx_core_helper_xe2_and_later.inl b/shared/source/helpers/gfx_core_helper_xe2_and_later.inl index afa53188b8..1c30e5b3de 100644 --- a/shared/source/helpers/gfx_core_helper_xe2_and_later.inl +++ b/shared/source/helpers/gfx_core_helper_xe2_and_later.inl @@ -22,6 +22,52 @@ void GfxCoreHelperHw::applyAdditionalCompressionSettings(Gmm &gmm, bool } } +template +const EngineInstancesContainer GfxCoreHelperHw::getGpgpuEngineInstances(const RootDeviceEnvironment &rootDeviceEnvironment) const { + auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo(); + auto defaultEngine = getChosenEngineType(hwInfo); + EngineInstancesContainer engines; + + uint32_t numCcs = hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled; + + if (hwInfo.featureTable.flags.ftrCCSNode) { + for (uint32_t i = 0; i < numCcs; i++) { + auto engineType = static_cast(i + aub_stream::ENGINE_CCS); + + engines.push_back({engineType, EngineUsage::regular}); + } + } + + if ((debugManager.flags.NodeOrdinal.get() == static_cast(aub_stream::EngineType::ENGINE_CCCS)) || + hwInfo.featureTable.flags.ftrRcsNode) { + engines.push_back({aub_stream::ENGINE_CCCS, EngineUsage::regular}); + } + + engines.push_back({defaultEngine, EngineUsage::lowPriority}); + engines.push_back({defaultEngine, EngineUsage::internal}); + + if (hwInfo.capabilityTable.blitterOperationsSupported) { + + if (hwInfo.featureTable.ftrBcsInfo.test(0)) { + engines.push_back({aub_stream::EngineType::ENGINE_BCS, EngineUsage::regular}); // Main copy engine + engines.push_back({aub_stream::EngineType::ENGINE_BCS, EngineUsage::internal}); // Internal usage + } + + uint32_t internalIndex = getInternalCopyEngineIndex(hwInfo); + for (uint32_t i = 1; i < hwInfo.featureTable.ftrBcsInfo.size(); i++) { + if (hwInfo.featureTable.ftrBcsInfo.test(i)) { + auto engineType = static_cast((i - 1) + aub_stream::ENGINE_BCS1); // Link copy engine + engines.push_back({engineType, EngineUsage::regular}); + if (i == internalIndex) { + engines.push_back({engineType, EngineUsage::internal}); + } + } + } + } + + return engines; +}; + template <> void GfxCoreHelperHw::applyRenderCompressionFlag(Gmm &gmm, uint32_t isCompressed) const {} diff --git a/shared/source/helpers/gfx_core_helper_xehp_and_later.inl b/shared/source/helpers/gfx_core_helper_xehp_and_later.inl index 94d2549646..4cd3466de2 100644 --- a/shared/source/helpers/gfx_core_helper_xehp_and_later.inl +++ b/shared/source/helpers/gfx_core_helper_xehp_and_later.inl @@ -71,37 +71,6 @@ bool GfxCoreHelperHw::makeResidentBeforeLockNeeded(bool precondition) return true; } -template -const EngineInstancesContainer GfxCoreHelperHw::getGpgpuEngineInstances(const RootDeviceEnvironment &rootDeviceEnvironment) const { - auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo(); - auto defaultEngine = getChosenEngineType(hwInfo); - - EngineInstancesContainer engines; - auto ailHelper = rootDeviceEnvironment.getAILConfigurationHelper(); - auto forceRcs = ailHelper && ailHelper->forceRcs(); - if (hwInfo.featureTable.flags.ftrCCSNode && !forceRcs) { - for (uint32_t i = 0; i < hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled; i++) { - engines.push_back({static_cast(i + aub_stream::ENGINE_CCS), EngineUsage::regular}); - } - } - - if ((debugManager.flags.NodeOrdinal.get() == static_cast(aub_stream::EngineType::ENGINE_RCS)) || - hwInfo.featureTable.flags.ftrRcsNode || - forceRcs) { - engines.push_back({aub_stream::ENGINE_RCS, EngineUsage::regular}); - } - - engines.push_back({defaultEngine, EngineUsage::lowPriority}); - engines.push_back({defaultEngine, EngineUsage::internal}); - - if (hwInfo.capabilityTable.blitterOperationsSupported && hwInfo.featureTable.ftrBcsInfo.test(0)) { - engines.push_back({aub_stream::ENGINE_BCS, EngineUsage::regular}); - engines.push_back({aub_stream::ENGINE_BCS, EngineUsage::internal}); // internal usage - } - - return engines; -}; - template EngineGroupType GfxCoreHelperHw::getEngineGroupType(aub_stream::EngineType engineType, EngineUsage engineUsage, const HardwareInfo &hwInfo) const { if (engineType == aub_stream::ENGINE_RCS) { diff --git a/shared/source/xe2_hpg_core/gfx_core_helper_xe2_hpg_core.cpp b/shared/source/xe2_hpg_core/gfx_core_helper_xe2_hpg_core.cpp index fb05fa960e..cbbcf349c0 100644 --- a/shared/source/xe2_hpg_core/gfx_core_helper_xe2_hpg_core.cpp +++ b/shared/source/xe2_hpg_core/gfx_core_helper_xe2_hpg_core.cpp @@ -46,46 +46,6 @@ uint8_t GfxCoreHelperHw::getBarriersCountFromHasBarriers(uint8_t hasBarr return possibleBarriersCounts[hasBarriers]; } -template <> -const EngineInstancesContainer GfxCoreHelperHw::getGpgpuEngineInstances(const RootDeviceEnvironment &rootDeviceEnvironment) const { - auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo(); - auto defaultEngine = getChosenEngineType(hwInfo); - EngineInstancesContainer engines; - - if (hwInfo.featureTable.flags.ftrCCSNode) { - for (uint32_t i = 0; i < hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled; i++) { - engines.push_back({static_cast(i + aub_stream::ENGINE_CCS), EngineUsage::regular}); - } - } - - if ((debugManager.flags.NodeOrdinal.get() == static_cast(aub_stream::EngineType::ENGINE_CCCS)) || - hwInfo.featureTable.flags.ftrRcsNode) { - engines.push_back({aub_stream::ENGINE_CCCS, EngineUsage::regular}); - } - engines.push_back({defaultEngine, EngineUsage::lowPriority}); - engines.push_back({defaultEngine, EngineUsage::internal}); - - if (hwInfo.capabilityTable.blitterOperationsSupported) { - if (hwInfo.featureTable.ftrBcsInfo.test(0)) { - engines.push_back({aub_stream::EngineType::ENGINE_BCS, EngineUsage::regular}); // Main copy engine - engines.push_back({aub_stream::EngineType::ENGINE_BCS, EngineUsage::internal}); // Internal usage - } - - uint32_t internalIndex = getInternalCopyEngineIndex(hwInfo); - for (uint32_t i = 1; i < hwInfo.featureTable.ftrBcsInfo.size(); i++) { - if (hwInfo.featureTable.ftrBcsInfo.test(i)) { - auto engineType = static_cast((i - 1) + aub_stream::ENGINE_BCS1); // Link copy engine - engines.push_back({engineType, EngineUsage::regular}); - if (i == internalIndex) { - engines.push_back({engineType, EngineUsage::internal}); - } - } - } - } - - return engines; -}; - template <> EngineGroupType GfxCoreHelperHw::getEngineGroupType(aub_stream::EngineType engineType, EngineUsage engineUsage, const HardwareInfo &hwInfo) const { if (engineType == aub_stream::ENGINE_CCCS) { diff --git a/shared/source/xe_hpg_core/gfx_core_helper_xe_hpg_core.cpp b/shared/source/xe_hpg_core/gfx_core_helper_xe_hpg_core.cpp index b262ad4e74..6beb296879 100644 --- a/shared/source/xe_hpg_core/gfx_core_helper_xe_hpg_core.cpp +++ b/shared/source/xe_hpg_core/gfx_core_helper_xe_hpg_core.cpp @@ -164,6 +164,37 @@ bool MemorySynchronizationCommands::isBarrierPriorToPipelineSelectWaRequ return rootDeviceEnvironment.getReleaseHelper()->isPipeControlPriorToPipelineSelectWaRequired(); } +template <> +const EngineInstancesContainer GfxCoreHelperHw::getGpgpuEngineInstances(const RootDeviceEnvironment &rootDeviceEnvironment) const { + auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo(); + auto defaultEngine = getChosenEngineType(hwInfo); + + EngineInstancesContainer engines; + auto ailHelper = rootDeviceEnvironment.getAILConfigurationHelper(); + auto forceRcs = ailHelper && ailHelper->forceRcs(); + if (hwInfo.featureTable.flags.ftrCCSNode && !forceRcs) { + for (uint32_t i = 0; i < hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled; i++) { + engines.push_back({static_cast(i + aub_stream::ENGINE_CCS), EngineUsage::regular}); + } + } + + if ((debugManager.flags.NodeOrdinal.get() == static_cast(aub_stream::EngineType::ENGINE_RCS)) || + hwInfo.featureTable.flags.ftrRcsNode || + forceRcs) { + engines.push_back({aub_stream::ENGINE_RCS, EngineUsage::regular}); + } + + engines.push_back({defaultEngine, EngineUsage::lowPriority}); + engines.push_back({defaultEngine, EngineUsage::internal}); + + if (hwInfo.capabilityTable.blitterOperationsSupported && hwInfo.featureTable.ftrBcsInfo.test(0)) { + engines.push_back({aub_stream::ENGINE_BCS, EngineUsage::regular}); + engines.push_back({aub_stream::ENGINE_BCS, EngineUsage::internal}); // internal usage + } + + return engines; +}; + template class GfxCoreHelperHw; template class FlatBatchBufferHelperHw; template struct MemorySynchronizationCommands;