Add flag to emit pipe control prior to walker.

Change-Id: Ief410664b09d758394744ebdf011923556864035
This commit is contained in:
Sebastian Luzynski
2020-07-06 09:34:15 +02:00
committed by sys_ocldev
parent 8324317f90
commit 49a7fb4b19
8 changed files with 96 additions and 1 deletions

View File

@@ -39,6 +39,8 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
const IndirectHeap &dsh, const IndirectHeap &ioh, const IndirectHeap &ssh,
uint32_t taskLevel, DispatchFlags &dispatchFlags, Device &device) override;
void forcePipeControl(NEO::LinearStream &commandStreamCSR);
bool flushBatchedSubmissions() override;
void programHardwareContext(LinearStream &cmdStream) override;
size_t getCmdsSizeForHardwareContext() const override;

View File

@@ -424,6 +424,10 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "this->taskCount", this->taskCount);
}
if (DebugManager.flags.ForcePipeControlPriorToWalker.get()) {
forcePipeControl(commandStreamCSR);
}
auto dshAllocation = dsh.getGraphicsAllocation();
auto iohAllocation = ioh.getGraphicsAllocation();
auto sshAllocation = ssh.getGraphicsAllocation();
@@ -554,6 +558,13 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
return completionStamp;
}
template <typename GfxFamily>
void CommandStreamReceiverHw<GfxFamily>::forcePipeControl(NEO::LinearStream &commandStreamCSR) {
PipeControlArgs args;
MemorySynchronizationCommands<GfxFamily>::addPipeControlWithCSStallOnly(commandStreamCSR, args);
MemorySynchronizationCommands<GfxFamily>::addPipeControl(commandStreamCSR, args);
}
template <typename GfxFamily>
inline void CommandStreamReceiverHw<GfxFamily>::programStallingPipeControlForBarrier(LinearStream &cmdStream, DispatchFlags &dispatchFlags) {
stallingPipeControlOnNextFlushRequired = false;
@@ -724,6 +735,10 @@ size_t CommandStreamReceiverHw<GfxFamily>::getRequiredCmdStreamSize(const Dispat
size += sizeof(typename GfxFamily::PIPE_CONTROL);
}
if (DebugManager.flags.ForcePipeControlPriorToWalker.get()) {
size += 2 * sizeof(PIPE_CONTROL);
}
return size;
}