Update command buffer task count in L0

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2021-06-29 12:10:27 +00:00
committed by Compute-Runtime-Automation
parent 850b38781d
commit 3b41378055
2 changed files with 6 additions and 0 deletions

View File

@@ -62,6 +62,9 @@ void CommandQueueImp::submitBatchBuffer(size_t offset, NEO::ResidencyContainer &
NEO::QueueThrottle::HIGH, NEO::QueueSliceCount::defaultSliceCount,
commandStream->getUsed(), commandStream, endingCmdPtr, false);
commandStream->getGraphicsAllocation()->updateTaskCount(csr->peekTaskCount() + 1, csr->getOsContext().getContextId());
commandStream->getGraphicsAllocation()->updateResidencyTaskCount(csr->peekTaskCount() + 1, csr->getOsContext().getContextId());
csr->submitBatchBuffer(batchBuffer, csr->getResidencyAllocations());
buffers.setCurrentFlushStamp(csr->obtainCurrentFlushStamp());
}

View File

@@ -232,6 +232,9 @@ HWTEST_F(CommandQueueCreate, givenContainerWithAllocationsWhenResidencyContainer
ResidencyContainer container;
commandQueue->submitBatchBuffer(0, container, nullptr);
EXPECT_EQ(csr->makeResidentCalledTimes, 0u);
EXPECT_EQ(commandQueue->commandStream->getGraphicsAllocation()->getTaskCount(commandQueue->csr->getOsContext().getContextId()), commandQueue->csr->peekTaskCount());
EXPECT_EQ(commandQueue->commandStream->getGraphicsAllocation()->getTaskCount(commandQueue->csr->getOsContext().getContextId()), commandQueue->csr->peekTaskCount());
commandQueue->destroy();
}