mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Ensure that SVM allocations are zero-copy.
Change-Id: I20a20af33f95014d74e8101789de2581259c62fa
This commit is contained in:
committed by
sys_ocldev
parent
6face330fd
commit
b4256453ed
@@ -345,3 +345,12 @@ TEST(MemoryManagerTest, givenMemoryManagerWhenBufferTypeIsPassedAndAllocateInDev
|
||||
|
||||
memoryManager.freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenSvmAllocationTypeWhenGetAllocationDataIsCalledThenZeroCopyIsRequested) {
|
||||
MockMemoryManager memoryManager(false);
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(true, 1);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr, GraphicsAllocation::AllocationType::SVM);
|
||||
EXPECT_TRUE(allocData.flags.mustBeZeroCopy);
|
||||
EXPECT_TRUE(allocData.flags.allocateMemory);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user