mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 17:41:26 +08:00
Move isPipeControlPriorToNonPipelinedStateCommandsWARequired to hwInfoConfig
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
975a64f42b
commit
3b4a5c25da
@@ -8,6 +8,7 @@
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
||||
#include "shared/source/helpers/state_compute_mode_helper.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
#include "pipe_control_args.h"
|
||||
|
||||
@@ -19,8 +20,8 @@ void CommandStreamReceiverHw<GfxFamily>::programComputeMode(LinearStream &stream
|
||||
programAdditionalPipelineSelect(stream, dispatchFlags.pipelineSelectArgs, true);
|
||||
this->lastSentCoherencyRequest = static_cast<int8_t>(dispatchFlags.requiresCoherency);
|
||||
|
||||
auto &hwHelper = HwHelperHw<Family>::get();
|
||||
if (hwHelper.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo)) {
|
||||
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
if (hwInfoConfig->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo)) {
|
||||
auto pPipeControlSpace = stream.getSpaceForCmd<PIPE_CONTROL>();
|
||||
|
||||
auto pipeControl = GfxFamily::cmdInitPipeControl;
|
||||
|
||||
@@ -57,8 +57,8 @@ size_t CommandStreamReceiverHw<GfxFamily>::getCmdSizeForComputeMode() {
|
||||
size_t size = 0;
|
||||
auto hwInfo = peekHwInfo();
|
||||
if (isComputeModeNeeded()) {
|
||||
auto &hwHelper = HwHelperHw<Family>::get();
|
||||
if (hwHelper.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo)) {
|
||||
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
if (hwInfoConfig->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo)) {
|
||||
size += sizeof(typename GfxFamily::PIPE_CONTROL);
|
||||
}
|
||||
size += sizeof(typename GfxFamily::STATE_COMPUTE_MODE);
|
||||
|
||||
@@ -99,7 +99,6 @@ class HwHelper {
|
||||
virtual bool isAdditionalFeatureFlagRequired(const FeatureTable *featureTable) const = 0;
|
||||
virtual uint32_t getMinimalSIMDSize() = 0;
|
||||
virtual bool isWorkaroundRequired(uint32_t lowestSteppingWithBug, uint32_t steppingWithFix, const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isFusedEuDispatchEnabled(const HardwareInfo &hwInfo) const = 0;
|
||||
@@ -278,8 +277,6 @@ class HwHelperHw : public HwHelper {
|
||||
|
||||
bool isWorkaroundRequired(uint32_t lowestSteppingWithBug, uint32_t steppingWithFix, const HardwareInfo &hwInfo) const override;
|
||||
|
||||
bool isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
@@ -383,11 +383,6 @@ bool HwHelperHw<GfxFamily>::isWorkaroundRequired(uint32_t lowestSteppingWithBug,
|
||||
return (lowestHwRevIdWithBug <= hwInfo.platform.usRevId && hwInfo.platform.usRevId < hwRevIdWithFix);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline bool HwHelperHw<GfxFamily>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool HwHelperHw<GfxFamily>::is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
|
||||
@@ -62,6 +62,7 @@ class HwInfoConfig {
|
||||
virtual bool isAllocationSizeAdjustmentRequired(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isPrefetchDisablingRequired(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isNewResidencyModelSupported() const = 0;
|
||||
virtual bool isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo) const = 0;
|
||||
|
||||
protected:
|
||||
virtual LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const = 0;
|
||||
@@ -109,6 +110,7 @@ class HwInfoConfigHw : public HwInfoConfig {
|
||||
bool isAllocationSizeAdjustmentRequired(const HardwareInfo &hwInfo) const override;
|
||||
bool isPrefetchDisablingRequired(const HardwareInfo &hwInfo) const override;
|
||||
bool isNewResidencyModelSupported() const override;
|
||||
bool isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
protected:
|
||||
HwInfoConfigHw() = default;
|
||||
|
||||
@@ -200,4 +200,10 @@ template <PRODUCT_FAMILY gfxProduct>
|
||||
bool HwInfoConfigHw<gfxProduct>::isPrefetchDisablingRequired(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool HwInfoConfigHw<gfxProduct>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -48,15 +48,6 @@ inline bool HwHelperHw<Family>::isSpecialWorkgroupSizeRequired(const HardwareInf
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
inline bool HwHelperHw<Family>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo) const {
|
||||
if ((hwInfo.platform.eProductFamily == IGFX_XE_HP_SDV && hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled > 1) ||
|
||||
DebugManager.flags.ProgramAdditionalPipeControlBeforeStateComputeModeCommand.get() == 1) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwHelperHw<Family>::isDirectSubmissionSupported(const HardwareInfo &hwInfo) const {
|
||||
if (hwInfo.platform.usRevId < HwInfoConfig::get(hwInfo.platform.eProductFamily)->getHwRevIdFromStepping(REVISION_B, hwInfo)) {
|
||||
|
||||
@@ -91,3 +91,12 @@ LocalMemoryAccessMode HwInfoConfigHw<gfxProduct>::getDefaultLocalMemoryAccessMod
|
||||
}
|
||||
return LocalMemoryAccessMode::Default;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<gfxProduct>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo) const {
|
||||
if (hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled > 1 ||
|
||||
DebugManager.flags.ProgramAdditionalPipeControlBeforeStateComputeModeCommand.get() == 1) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user