Get rid of processResidency() calls with null ResidencyContainer 2/n

Change-Id: Ic2495cd21304710825727177a1d90889e22808d8
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2018-09-11 11:19:21 +02:00
committed by sys_ocldev
parent 991bbddeba
commit 4da2dd471d
5 changed files with 11 additions and 5 deletions

View File

@@ -235,6 +235,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenWriteMemoryIsCa
HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenProcessResidencyIsCalledWithoutAllocationsForResidencyThenItShouldProcessAllocationsFromMemoryManager) {
TbxCommandStreamReceiverHw<FamilyType> *tbxCsr = (TbxCommandStreamReceiverHw<FamilyType> *)pCommandStreamReceiver;
TbxMemoryManager *memoryManager = tbxCsr->getMemoryManager();
ResidencyContainer &allocationsForResidency = memoryManager->getResidencyAllocations();
ASSERT_NE(nullptr, memoryManager);
auto graphicsAllocation = memoryManager->allocateGraphicsMemory(4096);
@@ -243,7 +244,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenProcessResidenc
EXPECT_EQ(ObjectNotResident, graphicsAllocation->residencyTaskCount);
memoryManager->pushAllocationForResidency(graphicsAllocation);
tbxCsr->processResidency(nullptr, *pDevice->getOsContext());
tbxCsr->processResidency(&allocationsForResidency, *pDevice->getOsContext());
EXPECT_NE(ObjectNotResident, graphicsAllocation->residencyTaskCount);
EXPECT_EQ((int)tbxCsr->peekTaskCount() + 1, graphicsAllocation->residencyTaskCount);