mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
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:
committed by
sys_ocldev
parent
991bbddeba
commit
4da2dd471d
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user