mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
WDDM Linux - allocate 32bit through KMD
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c03620468b
commit
37af6a64c1
@@ -337,7 +337,7 @@ GraphicsAllocation *WddmMemoryManager::allocate32BitGraphicsMemoryImpl(const All
|
||||
ptrAligned = alignDown(allocationData.hostPtr, MemoryConstants::allocationAlignment);
|
||||
sizeAligned = alignSizeWholePage(allocationData.hostPtr, sizeAligned);
|
||||
offset = ptrDiff(allocationData.hostPtr, ptrAligned);
|
||||
} else {
|
||||
} else if (preferredAllocationMethod == GfxMemoryAllocationMethod::UseUmdSystemPtr) {
|
||||
sizeAligned = alignUp(sizeAligned, MemoryConstants::allocationAlignment);
|
||||
pSysMem = allocateSystemMemory(sizeAligned, MemoryConstants::allocationAlignment);
|
||||
if (pSysMem == nullptr) {
|
||||
@@ -369,6 +369,11 @@ GraphicsAllocation *WddmMemoryManager::allocate32BitGraphicsMemoryImpl(const All
|
||||
auto baseAddress = getGfxPartition(allocationData.rootDeviceIndex)->getHeapBase(heapAssigner.get32BitHeapIndex(allocationData.type, useLocalMemory, *hwInfo, allocationData.flags.use32BitFrontWindow));
|
||||
wddmAllocation->setGpuBaseAddress(GmmHelper::canonize(baseAddress));
|
||||
|
||||
if (preferredAllocationMethod != GfxMemoryAllocationMethod::UseUmdSystemPtr) {
|
||||
auto lockedPtr = lockResource(wddmAllocation.get());
|
||||
wddmAllocation->setCpuAddress(lockedPtr);
|
||||
}
|
||||
|
||||
return wddmAllocation.release();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user