mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
L0 Virtual Memory Reservation support
- Enable support for L0 Virtual Memory reservation on Linux and Windows. - Excludes support for Linux to allow pStart option Related-To: LOCI-3397, LOCI-1543 Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
467119931c
commit
d81b0b14a1
@ -283,7 +283,7 @@ TEST_F(Wddm20WithMockGdiDllTests, givenAllocationSmallerUnderlyingThanAlignedSiz
|
||||
TEST_F(Wddm20WithMockGdiDllTests, givenReserveCallWhenItIsCalledWithProperParamtersThenAddressInRangeIsReturend) {
|
||||
auto sizeAlignedTo64Kb = 64 * KB;
|
||||
|
||||
auto reservationAddress = wddm->reserveGpuVirtualAddress(wddm->getGfxPartition().Heap32[0].Base,
|
||||
auto reservationAddress = wddm->reserveGpuVirtualAddress(0ull, wddm->getGfxPartition().Heap32[0].Base,
|
||||
wddm->getGfxPartition().Heap32[0].Limit,
|
||||
sizeAlignedTo64Kb);
|
||||
|
||||
|
@ -564,12 +564,15 @@ TEST_F(WddmMemoryManagerSimpleTest, givenNonZeroFenceValueOnSomeOfMultipleEngine
|
||||
memoryManager->freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
TEST_F(WddmMemoryManagerSimpleTest, givenWddmMemoryManagerWhenGpuAddressIsReservedAndFreedThenAddressRangeIsZero) {
|
||||
auto addressRange = memoryManager->reserveGpuAddress(MemoryConstants::pageSize, 0);
|
||||
TEST_F(WddmMemoryManagerSimpleTest, givenWddmMemoryManagerWhenGpuAddressIsReservedAndFreedThenAddressRangeIsNonZero) {
|
||||
RootDeviceIndicesContainer rootDevices;
|
||||
rootDevices.push_back(0);
|
||||
uint32_t rootDeviceIndexReserved = 1;
|
||||
auto addressRange = memoryManager->reserveGpuAddress(nullptr, MemoryConstants::pageSize64k, rootDevices, &rootDeviceIndexReserved);
|
||||
auto gmmHelper = memoryManager->getGmmHelper(0);
|
||||
|
||||
EXPECT_EQ(0u, gmmHelper->decanonize(addressRange.address));
|
||||
EXPECT_EQ(0u, addressRange.size);
|
||||
EXPECT_EQ(0u, rootDeviceIndexReserved);
|
||||
EXPECT_NE(0u, gmmHelper->decanonize(addressRange.address));
|
||||
EXPECT_EQ(MemoryConstants::pageSize64k, addressRange.size);
|
||||
|
||||
memoryManager->freeGpuAddress(addressRange, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user