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

@@ -1606,7 +1606,6 @@ TEST_F(DrmCommandStreamLeaksTest, BufferResidency) {
std::unique_ptr<Buffer> buffer(DrmMockBuffer::create());
ASSERT_FALSE(buffer->getGraphicsAllocation()->isResident(0u));
ASSERT_EQ(ObjectNotResident, buffer->getGraphicsAllocation()->getResidencyTaskCount(0u));
ASSERT_GT(buffer->getSize(), 0u);
//make it resident 8 times
@@ -1614,7 +1613,7 @@ TEST_F(DrmCommandStreamLeaksTest, BufferResidency) {
csr->makeResident(*buffer->getGraphicsAllocation());
csr->processResidency(csr->getResidencyAllocations(), *osContext);
EXPECT_TRUE(buffer->getGraphicsAllocation()->isResident(0u));
EXPECT_EQ(buffer->getGraphicsAllocation()->getResidencyTaskCount(0u), (int)csr->peekTaskCount() + 1);
EXPECT_EQ(buffer->getGraphicsAllocation()->getResidencyTaskCount(0u), csr->peekTaskCount() + 1);
}
csr->makeNonResident(*buffer->getGraphicsAllocation());
@@ -1622,7 +1621,6 @@ TEST_F(DrmCommandStreamLeaksTest, BufferResidency) {
csr->makeNonResident(*buffer->getGraphicsAllocation());
EXPECT_FALSE(buffer->getGraphicsAllocation()->isResident(0u));
EXPECT_EQ(ObjectNotResident, buffer->getGraphicsAllocation()->getResidencyTaskCount(0u));
}
typedef Test<DrmCommandStreamEnhancedFixture> DrmCommandStreamMemoryManagerTest;