feature: Support for using Reserved address with multiple mappings

Related-To: LOCI-4381

- Enabled support for customers to use full Virtual reservation range
with multiple physical mappings with additional allocations implicitly
included in residency.
- Buffer Surface state size extended for first allocation to stretch to
the bufferSize requested.

Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
This commit is contained in:
Neil R Spruit
2023-05-24 02:07:44 +00:00
committed by Compute-Runtime-Automation
parent d00345d115
commit ba6d447b4d
11 changed files with 265 additions and 1 deletions

View File

@@ -35,6 +35,21 @@ TEST(MemoryManagerTest, WhenCallingCloseInternalHandleWithOsAgnosticThenNoChange
memoryManager.closeInternalHandle(handle, 0u, nullptr);
}
TEST(MemoryManagerTest, givenDefaultMemoryManagerWhenGraphicsAllocationContainsExtendedSizeThenExtendedSizeObtainedIsTheNewSize) {
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
OsAgnosticMemoryManager memoryManager(executionEnvironment);
auto graphicsAllocation = memoryManager.allocateGraphicsMemoryWithProperties(MockAllocationProperties{0, MemoryConstants::pageSize});
EXPECT_EQ(0u, graphicsAllocation->getExtendedBufferSize());
graphicsAllocation->setExtendedSize(MemoryConstants::pageSize * 2);
EXPECT_NE(MemoryConstants::pageSize, graphicsAllocation->getExtendedBufferSize());
EXPECT_EQ(MemoryConstants::pageSize * 2, graphicsAllocation->getExtendedBufferSize());
memoryManager.freeGraphicsMemory(graphicsAllocation);
}
TEST(MemoryManagerTest, WhenCallingIsAllocationTypeToCaptureThenScratchAndPrivateTypesReturnTrue) {
MockMemoryManager mockMemoryManager;