Skip to content

Commit 3b41378

Browse files
Update command buffer task count in L0
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
1 parent 850b387 commit 3b41378

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

level_zero/core/source/cmdqueue/cmdqueue.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ void CommandQueueImp::submitBatchBuffer(size_t offset, NEO::ResidencyContainer &
6262
NEO::QueueThrottle::HIGH, NEO::QueueSliceCount::defaultSliceCount,
6363
commandStream->getUsed(), commandStream, endingCmdPtr, false);
6464

65+
commandStream->getGraphicsAllocation()->updateTaskCount(csr->peekTaskCount() + 1, csr->getOsContext().getContextId());
66+
commandStream->getGraphicsAllocation()->updateResidencyTaskCount(csr->peekTaskCount() + 1, csr->getOsContext().getContextId());
67+
6568
csr->submitBatchBuffer(batchBuffer, csr->getResidencyAllocations());
6669
buffers.setCurrentFlushStamp(csr->obtainCurrentFlushStamp());
6770
}

level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ HWTEST_F(CommandQueueCreate, givenContainerWithAllocationsWhenResidencyContainer
232232
ResidencyContainer container;
233233
commandQueue->submitBatchBuffer(0, container, nullptr);
234234
EXPECT_EQ(csr->makeResidentCalledTimes, 0u);
235+
236+
EXPECT_EQ(commandQueue->commandStream->getGraphicsAllocation()->getTaskCount(commandQueue->csr->getOsContext().getContextId()), commandQueue->csr->peekTaskCount());
237+
EXPECT_EQ(commandQueue->commandStream->getGraphicsAllocation()->getTaskCount(commandQueue->csr->getOsContext().getContextId()), commandQueue->csr->peekTaskCount());
235238
commandQueue->destroy();
236239
}
237240

0 commit comments

Comments
 (0)