Update command buffer task count outside flush

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2021-06-22 10:09:40 +00:00
committed by Compute-Runtime-Automation
parent a0587097e3
commit a30347cbc5
2 changed files with 2 additions and 2 deletions

View File

@ -69,8 +69,6 @@ bool DrmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer, Reside
this->printDeviceIndex();
DrmAllocation *alloc = static_cast<DrmAllocation *>(batchBuffer.commandBufferAllocation);
DEBUG_BREAK_IF(!alloc);
alloc->updateTaskCount(this->taskCount + 1, this->osContext->getContextId());
alloc->updateResidencyTaskCount(this->taskCount + 1, this->osContext->getContextId());
BufferObject *bb = alloc->getBO();
if (bb == nullptr) {

View File

@ -568,6 +568,8 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
BatchBuffer batchBuffer{streamToSubmit.getGraphicsAllocation(), startOffset, chainedBatchBufferStartOffset, chainedBatchBuffer,
dispatchFlags.requiresCoherency, dispatchFlags.lowPriority, dispatchFlags.throttle, dispatchFlags.sliceCount,
streamToSubmit.getUsed(), &streamToSubmit, bbEndLocation, dispatchFlags.useSingleSubdevice};
streamToSubmit.getGraphicsAllocation()->updateTaskCount(this->taskCount + 1, this->osContext->getContextId());
streamToSubmit.getGraphicsAllocation()->updateResidencyTaskCount(this->taskCount + 1, this->osContext->getContextId());
if (submitCSR | submitTask) {
if (this->dispatchMode == DispatchMode::ImmediateDispatch) {