Program additional pipe control before state compute mode command

Related-To: NEO-6056
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2021-08-20 14:04:18 +00:00
committed by Compute-Runtime-Automation
parent 175b1b7501
commit fccd22e3c7
5 changed files with 122 additions and 0 deletions

View File

@@ -339,3 +339,4 @@ DECLARE_DEBUG_VARIABLE(bool, DisableDeepBind, false, "Disable passing RTLD_DEEPB
DECLARE_DEBUG_VARIABLE(bool, UseUmKmDataTranslator, false, "Use helper library for UMD<->KMD (WDDM) struct layout compatibility")
DECLARE_DEBUG_VARIABLE(bool, SkipFlushingEventsOnGetStatusCalls, false, "When set to 1, events are not causing internal flush when querying for CL_EVENT_COMMAND_EXECUTION_STATUS")
DECLARE_DEBUG_VARIABLE(bool, AllowUnrestrictedSize, false, "Allow allocating memory with greater size than MAX_MEM_ALLOC_SIZE")
DECLARE_DEBUG_VARIABLE(bool, ProgramAdditionalPipeControlBeforeStateComputeModeCommand, false, "Program additional PIPE CONTROL command before STATE_COMPUTE_MODE command")

View File

@@ -68,6 +68,41 @@ size_t CommandStreamReceiverHw<Family>::getCmdSizeForPerDssBackedBuffer(const Ha
return 0;
}
template <>
inline bool CommandStreamReceiverHw<Family>::isAdditionalPipeControlNeeded() const {
return DebugManager.flags.ProgramAdditionalPipeControlBeforeStateComputeModeCommand.get();
}
template <>
void CommandStreamReceiverHw<Family>::programComputeMode(LinearStream &stream, DispatchFlags &dispatchFlags, const HardwareInfo &hwInfo) {
using PIPE_CONTROL = typename Family::PIPE_CONTROL;
if (isComputeModeNeeded()) {
this->lastSentCoherencyRequest = static_cast<int8_t>(dispatchFlags.requiresCoherency);
if (DebugManager.flags.ProgramAdditionalPipeControlBeforeStateComputeModeCommand.get()) {
auto pc = stream.getSpaceForCmd<PIPE_CONTROL>();
*pc = Family::cmdInitPipeControl;
pc->setHdcPipelineFlush(true);
pc->setAmfsFlushEnable(true);
pc->setCommandStreamerStallEnable(true);
pc->setInstructionCacheInvalidateEnable(true);
pc->setTextureCacheInvalidationEnable(true);
pc->setDcFlushEnable(true);
pc->setConstantCacheInvalidationEnable(true);
pc->setStateCacheInvalidationEnable(true);
}
auto stateComputeMode = Family::cmdInitStateComputeMode;
EncodeStates<Family>::adjustStateComputeMode(stream, dispatchFlags.numGrfRequired, &stateComputeMode,
dispatchFlags.requiresCoherency, this->requiredThreadArbitrationPolicy, hwInfo);
if (csrSizeRequestFlags.hasSharedHandles) {
auto pc = stream.getSpaceForCmd<PIPE_CONTROL>();
*pc = Family::cmdInitPipeControl;
}
}
}
template <>
void BlitCommandsHelper<Family>::appendClearColor(const BlitProperties &blitProperties, typename Family::XY_COPY_BLT &blitCmd) {
using XY_COPY_BLT = typename Family::XY_COPY_BLT;