mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:35:19 +08:00
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:
committed by
Compute-Runtime-Automation
parent
d00345d115
commit
ba6d447b4d
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user