Make command buffers resident at cmd container init

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2023-03-15 13:01:41 +00:00
committed by Compute-Runtime-Automation
parent eff7439eca
commit 79075a3e92
2 changed files with 10 additions and 3 deletions

View File

@@ -372,6 +372,14 @@ TEST_F(CommandContainerTest, givenCommandContainerWhenWantToAddNullPtrToResidenc
EXPECT_EQ(cmdContainer.getResidencyContainer().size(), size);
}
TEST_F(CommandContainerTest, givenCommandContainerWhenInitializeThenCmdBuffersAreAddedToResidencyContainer) {
CommandContainer cmdContainer;
EXPECT_EQ(cmdContainer.getResidencyContainer().size(), 0u);
cmdContainer.initialize(pDevice, nullptr, false, true);
EXPECT_EQ(cmdContainer.getResidencyContainer().size(), 2u);
EXPECT_EQ(cmdContainer.getResidencyContainer().size(), cmdContainer.getCmdBufferAllocations().size());
}
TEST_F(CommandContainerTest, givenCommandContainerWhenWantToAddAlreadyAddedAllocationAndDuplicatesRemovedThenExpectedSizeIsReturned) {
CommandContainer cmdContainer;
cmdContainer.initialize(pDevice, nullptr, true, false);