Change type of residency task count to uint32_t

Move definitions of objectNotUsed and objectNotResident to GraphicsAllocation

Change-Id: I2aec604a865cc6c975e9d1121028cbdd35c0b18a
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2018-11-07 08:33:55 +00:00
committed by sys_ocldev
parent bd4ea652ec
commit 66492a53a4
19 changed files with 110 additions and 109 deletions

View File

@@ -227,13 +227,13 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenProcessResidenc
auto graphicsAllocation = memoryManager->allocateGraphicsMemory(4096);
ASSERT_NE(nullptr, graphicsAllocation);
EXPECT_EQ(ObjectNotResident, graphicsAllocation->getResidencyTaskCount(0u));
EXPECT_FALSE(graphicsAllocation->isResident(0u));
ResidencyContainer allocationsForResidency = {graphicsAllocation};
tbxCsr->processResidency(allocationsForResidency, *pDevice->getOsContext());
EXPECT_NE(ObjectNotResident, graphicsAllocation->getResidencyTaskCount(0u));
EXPECT_EQ((int)tbxCsr->peekTaskCount() + 1, graphicsAllocation->getResidencyTaskCount(0u));
EXPECT_TRUE(graphicsAllocation->isResident(0u));
EXPECT_EQ(tbxCsr->peekTaskCount() + 1, graphicsAllocation->getResidencyTaskCount(0u));
memoryManager->freeGraphicsMemory(graphicsAllocation);
}
@@ -246,13 +246,13 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenProcessResidenc
auto graphicsAllocation = memoryManager->allocateGraphicsMemory(4096);
ASSERT_NE(nullptr, graphicsAllocation);
EXPECT_EQ(ObjectNotResident, graphicsAllocation->getResidencyTaskCount(0u));
EXPECT_FALSE(graphicsAllocation->isResident(0u));
ResidencyContainer allocationsForResidency = {graphicsAllocation};
tbxCsr->processResidency(allocationsForResidency, *pDevice->getOsContext());
EXPECT_NE(ObjectNotResident, graphicsAllocation->getResidencyTaskCount(0u));
EXPECT_EQ((int)tbxCsr->peekTaskCount() + 1, graphicsAllocation->getResidencyTaskCount(0u));
EXPECT_TRUE(graphicsAllocation->isResident(0u));
EXPECT_EQ(tbxCsr->peekTaskCount() + 1, graphicsAllocation->getResidencyTaskCount(0u));
memoryManager->freeGraphicsMemory(graphicsAllocation);
}
@@ -273,12 +273,12 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenFlushIsCalledTh
auto engineType = OCLRT::ENGINE_RCS;
ResidencyContainer allocationsForResidency = {graphicsAllocation};
EXPECT_EQ(ObjectNotResident, graphicsAllocation->getResidencyTaskCount(0u));
EXPECT_FALSE(graphicsAllocation->isResident(0u));
tbxCsr->flush(batchBuffer, engineType, allocationsForResidency, *pDevice->getOsContext());
EXPECT_NE(ObjectNotResident, graphicsAllocation->getResidencyTaskCount(0u));
EXPECT_EQ((int)tbxCsr->peekTaskCount() + 1, graphicsAllocation->getResidencyTaskCount(0u));
EXPECT_TRUE(graphicsAllocation->isResident(0u));
EXPECT_EQ(tbxCsr->peekTaskCount() + 1, graphicsAllocation->getResidencyTaskCount(0u));
memoryManager->freeGraphicsMemory(commandBuffer);
memoryManager->freeGraphicsMemory(graphicsAllocation);