mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-07 21:27:04 +08:00
performance: Allocate by KMD on BMG
Related-To: NEO-10526 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1252b10ba9
commit
d40a804bca
@@ -199,7 +199,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemory64kb(const Allocati
|
||||
}
|
||||
|
||||
GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryUsingKmdAndMapItToCpuVA(const AllocationData &allocationData, bool allowLargePages) {
|
||||
if (allocationData.alignment != MemoryConstants::pageSize64k) {
|
||||
if (allocationData.alignment < MemoryConstants::pageSize64k) {
|
||||
allowLargePages = false;
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryUsingKmdAndMapItToC
|
||||
|
||||
if (alignGpuAddressTo64KB) {
|
||||
void *tempCPUPtr = cpuPtr;
|
||||
cpuPtr = alignUp(cpuPtr, MemoryConstants::pageSize64k);
|
||||
cpuPtr = alignUp(cpuPtr, std::max(allocationData.alignment, MemoryConstants::pageSize64k));
|
||||
wddmAllocation->setGpuAddress(wddmAllocation->getGpuAddress() + ptrDiff(cpuPtr, tempCPUPtr));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user