Enable adding extra pipe control on specific platforms

Related-To: NEO-6056
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2021-08-31 09:32:53 +00:00
committed by Compute-Runtime-Automation
parent 3fafdf3f29
commit 7c1ea18f74
10 changed files with 92 additions and 15 deletions

View File

@@ -72,7 +72,6 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
size_t getCmdSizeForPerDssBackedBuffer(const HardwareInfo &hwInfo);
bool isComputeModeNeeded() const;
bool isAdditionalPipeControlNeeded() const;
bool isPipelineSelectAlreadyProgrammed() const;
void programComputeMode(LinearStream &csr, DispatchFlags &dispatchFlags, const HardwareInfo &hwInfo);

View File

@@ -1356,11 +1356,6 @@ inline bool CommandStreamReceiverHw<GfxFamily>::isComputeModeNeeded() const {
return false;
}
template <typename GfxFamily>
inline bool CommandStreamReceiverHw<GfxFamily>::isAdditionalPipeControlNeeded() const {
return false;
}
template <typename GfxFamily>
inline MemoryCompressionState CommandStreamReceiverHw<GfxFamily>::getMemoryCompressionState(bool auxTranslationRequired, const HardwareInfo &hwInfo) const {
return MemoryCompressionState::NotApplicable;

View File

@@ -19,7 +19,8 @@ void CommandStreamReceiverHw<GfxFamily>::programComputeMode(LinearStream &stream
programAdditionalPipelineSelect(stream, dispatchFlags.pipelineSelectArgs, true);
this->lastSentCoherencyRequest = static_cast<int8_t>(dispatchFlags.requiresCoherency);
if (DebugManager.flags.ProgramAdditionalPipeControlBeforeStateComputeModeCommand.get()) {
auto &hwHelper = HwHelperHw<Family>::get();
if (hwHelper.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo)) {
auto pPipeControlSpace = stream.getSpaceForCmd<PIPE_CONTROL>();
auto pipeControl = GfxFamily::cmdInitPipeControl;

View File

@@ -55,8 +55,10 @@ size_t CommandStreamReceiverHw<GfxFamily>::getCmdSizeForComputeMode() {
}
size_t size = 0;
auto hwInfo = peekHwInfo();
if (isComputeModeNeeded()) {
if (isAdditionalPipeControlNeeded()) {
auto &hwHelper = HwHelperHw<Family>::get();
if (hwHelper.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo)) {
size += sizeof(typename GfxFamily::PIPE_CONTROL);
}
size += sizeof(typename GfxFamily::STATE_COMPUTE_MODE);

View File

@@ -106,6 +106,7 @@ 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;
@@ -287,6 +288,8 @@ 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;

View File

@@ -383,6 +383,11 @@ 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;

View File

@@ -68,11 +68,6 @@ size_t CommandStreamReceiverHw<Family>::getCmdSizeForPerDssBackedBuffer(const Ha
return 0;
}
template <>
inline bool CommandStreamReceiverHw<Family>::isAdditionalPipeControlNeeded() const {
return DebugManager.flags.ProgramAdditionalPipeControlBeforeStateComputeModeCommand.get();
}
template <>
void BlitCommandsHelper<Family>::appendClearColor(const BlitProperties &blitProperties, typename Family::XY_COPY_BLT &blitCmd) {
using XY_COPY_BLT = typename Family::XY_COPY_BLT;

View File

@@ -48,6 +48,15 @@ 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>::isNewResidencyModelSupported() const {
return true;