Restore wait on user fence during cmdlist destoy/reset

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-7156
This commit is contained in:
Kamil Kopryk
2022-08-23 15:27:39 +00:00
committed by Compute-Runtime-Automation
parent 60451b590d
commit 9974d95dc3
2 changed files with 3 additions and 2 deletions

View File

@ -236,6 +236,7 @@ IndirectHeap *CommandContainer::getHeapWithRequiredSizeAndAlignment(HeapType hea
void CommandContainer::handleCmdBufferAllocations(size_t startIndex) {
for (size_t i = startIndex; i < cmdBufferAllocations.size(); i++) {
if (this->reusableAllocationList) {
this->device->getMemoryManager()->handleFenceCompletion(cmdBufferAllocations[i]);
reusableAllocationList->pushFrontOne(*cmdBufferAllocations[i]);
} else {
this->device->getMemoryManager()->freeGraphicsMemory(cmdBufferAllocations[i]);

View File

@ -219,7 +219,7 @@ TEST_F(CommandContainerTest, givenCmdContainerWithAllocsListWhenAllocateAndReset
auto cmdBuffer1 = cmdBufferAllocs[1];
cmdContainer->reset();
EXPECT_EQ(memoryManager->handleFenceCompletionCalled, 0u);
EXPECT_EQ(memoryManager->handleFenceCompletionCalled, 1u);
EXPECT_EQ(cmdBufferAllocs.size(), 1u);
EXPECT_EQ(cmdBufferAllocs[0], cmdBuffer0);
EXPECT_FALSE(allocList.peekIsEmpty());
@ -231,7 +231,7 @@ TEST_F(CommandContainerTest, givenCmdContainerWithAllocsListWhenAllocateAndReset
EXPECT_TRUE(allocList.peekIsEmpty());
cmdContainer.reset();
EXPECT_EQ(memoryManager->handleFenceCompletionCalled, 0u);
EXPECT_EQ(memoryManager->handleFenceCompletionCalled, 3u);
EXPECT_FALSE(allocList.peekIsEmpty());
allocList.freeAllGraphicsAllocations(pDevice);
}