Add support for reduced GPU address space

Change-Id: I9ebbc8c51039bb533b44c6b80e717e1489a20a43
Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
This commit is contained in:
Pawel Wilma
2018-08-24 15:23:45 +02:00
committed by sys_ocldev
parent f6743ced2a
commit 4a12deea2b
44 changed files with 473 additions and 270 deletions

View File

@@ -1307,6 +1307,17 @@ TEST(OsAgnosticMemoryManager, givenDefaultOsAgnosticMemoryManagerWhenItIsQueried
EXPECT_EQ(heapBase, memoryManager.getInternalHeapBaseAddress());
}
TEST(OsAgnosticMemoryManager, givenOsAgnosticMemoryManagerWhenAllocateGraphicsMemoryForNonSvmHostPtrIsCalledThenAllocationIsCreated) {
OsAgnosticMemoryManager memoryManager;
auto hostPtr = reinterpret_cast<void *>(0x5001);
auto allocation = memoryManager.allocateGraphicsMemoryForNonSvmHostPtr(13, hostPtr);
EXPECT_NE(nullptr, allocation);
EXPECT_EQ(13u, allocation->getUnderlyingBufferSize());
EXPECT_EQ(1u, allocation->allocationOffset);
memoryManager.freeGraphicsMemory(allocation);
}
TEST_F(MemoryAllocatorTest, GivenSizeWhenGmmIsCreatedThenSuccess) {
Gmm *gmm = new Gmm(nullptr, 65536, false);
EXPECT_NE(nullptr, gmm);