mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Create getGmmHelper function in MemoryManager
Related-To: NEO-6523 Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
518595dd97
commit
4f1e01d279
@@ -395,7 +395,7 @@ GraphicsAllocation *WddmMemoryManager::allocate32BitGraphicsMemoryImpl(const All
|
||||
return nullptr;
|
||||
}
|
||||
auto baseAddress = getGfxPartition(allocationData.rootDeviceIndex)->getHeapBase(heapAssigner.get32BitHeapIndex(allocationData.type, useLocalMemory, *hwInfo, allocationData.flags.use32BitFrontWindow));
|
||||
auto gmmHelper = executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getGmmHelper();
|
||||
auto gmmHelper = getGmmHelper(allocationData.rootDeviceIndex);
|
||||
wddmAllocation->setGpuBaseAddress(gmmHelper->canonize(baseAddress));
|
||||
|
||||
if (preferredAllocationMethod != GfxMemoryAllocationMethod::UseUmdSystemPtr) {
|
||||
@@ -439,7 +439,7 @@ GraphicsAllocation *WddmMemoryManager::createAllocationFromHandle(osHandle handl
|
||||
allocation->setReservedAddressRange(ptr, size);
|
||||
} else if (requireSpecificBitness && this->force32bitAllocations) {
|
||||
allocation->set32BitAllocation(true);
|
||||
auto gmmHelper = executionEnvironment.rootDeviceEnvironments[allocation->getRootDeviceIndex()]->getGmmHelper();
|
||||
auto gmmHelper = getGmmHelper(allocation->getRootDeviceIndex());
|
||||
allocation->setGpuBaseAddress(gmmHelper->canonize(getExternalHeapBaseAddress(allocation->getRootDeviceIndex(), false)));
|
||||
}
|
||||
status = mapGpuVirtualAddress(allocation.get(), allocation->getReservedAddressPtr());
|
||||
@@ -775,7 +775,7 @@ bool WddmMemoryManager::mapMultiHandleAllocationWithRetry(WddmAllocation *alloca
|
||||
allocation->reservedSizeForGpuVirtualAddress = alignUp(alignedSize, MemoryConstants::pageSize64k);
|
||||
allocation->reservedGpuVirtualAddress = wddm.reserveGpuVirtualAddress(gfxPartition->getHeapMinimalAddress(heapIndex), gfxPartition->getHeapLimit(heapIndex),
|
||||
allocation->reservedSizeForGpuVirtualAddress);
|
||||
auto gmmHelper = executionEnvironment.rootDeviceEnvironments[allocation->getRootDeviceIndex()]->getGmmHelper();
|
||||
auto gmmHelper = getGmmHelper(allocation->getRootDeviceIndex());
|
||||
allocation->getGpuAddressToModify() = gmmHelper->canonize(allocation->reservedGpuVirtualAddress);
|
||||
addressToMap = allocation->reservedGpuVirtualAddress;
|
||||
}
|
||||
@@ -1093,7 +1093,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryInDevicePool(const
|
||||
wddmAllocation->setCpuAddress(lockResource(wddmAllocation.get()));
|
||||
}
|
||||
if (heapAssigner.useInternal32BitHeap(allocationData.type)) {
|
||||
auto gmmHelper = executionEnvironment.rootDeviceEnvironments[wddmAllocation->getRootDeviceIndex()]->getGmmHelper();
|
||||
auto gmmHelper = getGmmHelper(wddmAllocation->getRootDeviceIndex());
|
||||
wddmAllocation->setGpuBaseAddress(gmmHelper->canonize(getInternalHeapBaseAddress(wddmAllocation->getRootDeviceIndex(), true)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user