mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 00:03:14 +08:00
Fill leftover cmdbuffer space with MI_NOOPs in debugger and sw tag paths
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com> Related-To: NEO-7156
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c2cd1a2698
commit
fad4bee432
@@ -156,7 +156,7 @@ struct CommandQueueHw : public CommandQueueImp {
|
||||
inline void assignCsrTaskCountToFenceIfAvailable(ze_fence_handle_t hFence);
|
||||
inline void dispatchTaskCountPostSyncRegular(bool isDispatchTaskCountPostSyncRequired, NEO::LinearStream &commandStream);
|
||||
inline void dispatchTaskCountPostSyncByMiFlushDw(bool isDispatchTaskCountPostSyncRequired, NEO::LinearStream &commandStream);
|
||||
inline NEO::SubmissionStatus prepareAndSubmitBatchBuffer(CommandListExecutionContext &ctx, NEO::LinearStream &innerCommandStream);
|
||||
NEO::SubmissionStatus prepareAndSubmitBatchBuffer(CommandListExecutionContext &ctx, NEO::LinearStream &innerCommandStream);
|
||||
inline void updateTaskCountAndPostSync(bool isDispatchTaskCountPostSyncRequired);
|
||||
inline ze_result_t waitForCommandQueueCompletionAndCleanHeapContainer();
|
||||
inline ze_result_t handleSubmissionAndCompletionResults(NEO::SubmissionStatus submitRet, ze_result_t completionRet);
|
||||
|
||||
@@ -1017,7 +1017,15 @@ NEO::SubmissionStatus CommandQueueHw<gfxCoreFamily>::prepareAndSubmitBatchBuffer
|
||||
*(MI_BATCH_BUFFER_END *)buffer = GfxFamily::cmdInitBatchBufferEnd;
|
||||
}
|
||||
|
||||
if (this->alignedChildStreamPadding) {
|
||||
if (ctx.isNEODebuggerActive(this->device) || NEO::DebugManager.flags.EnableSWTags.get()) {
|
||||
auto leftoverSpace = outerCommandStream.getUsed() - innerCommandStream.getUsed();
|
||||
leftoverSpace -= ptrDiff(innerCommandStream.getCpuBase(), outerCommandStream.getCpuBase());
|
||||
|
||||
if (leftoverSpace > 0) {
|
||||
auto memory = innerCommandStream.getSpace(leftoverSpace);
|
||||
memset(memory, 0, leftoverSpace);
|
||||
}
|
||||
} else if (this->alignedChildStreamPadding) {
|
||||
void *paddingPtr = innerCommandStream.getSpace(this->alignedChildStreamPadding);
|
||||
memset(paddingPtr, 0, this->alignedChildStreamPadding);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user