mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
WSL - fixing allocation alignment
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
2fab8ccf05
commit
766d56e300
@@ -199,7 +199,9 @@ GraphicsAllocation *WddmMemoryManager::allocateUSMHostGraphicsMemory(const Alloc
|
||||
}
|
||||
|
||||
GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryWithAlignment(const AllocationData &allocationData) {
|
||||
if (preferredAllocationMethod == GfxMemoryAllocationMethod::UseUmdSystemPtr) {
|
||||
auto pageSize = NEO::OSInterface::osEnabled64kbPages ? MemoryConstants::pageSize64k : MemoryConstants::pageSize;
|
||||
bool requiresNonStandardAlignment = allocationData.alignment > pageSize;
|
||||
if ((preferredAllocationMethod == GfxMemoryAllocationMethod::UseUmdSystemPtr) || requiresNonStandardAlignment) {
|
||||
return allocateSystemMemoryAndCreateGraphicsAllocationFromIt(allocationData);
|
||||
} else {
|
||||
return allocateGraphicsMemoryUsingKmdAndMapItToCpuVA(allocationData, NEO::OSInterface::osEnabled64kbPages);
|
||||
|
||||
Reference in New Issue
Block a user