GPU Allocation created by KMD not mapped to cpuPtr

- do not map to locked cpuPtr on limited address space
platforms

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2021-08-23 16:04:23 +02:00
committed by Compute-Runtime-Automation
parent 0b9e87e35f
commit ac30102309
3 changed files with 52 additions and 11 deletions

View File

@ -131,7 +131,13 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryUsingKmdAndMapItToC
auto cpuPtr = gmm->isCompressionEnabled ? nullptr : lockResource(wddmAllocation.get());
[[maybe_unused]] auto status = mapGpuVirtualAddress(wddmAllocation.get(), cpuPtr);
[[maybe_unused]] auto status = true;
if (executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getHardwareInfo()->capabilityTable.gpuAddressSpace >= MemoryConstants::max64BitAppAddress || is32bit) {
status = mapGpuVirtualAddress(wddmAllocation.get(), cpuPtr);
} else {
status = mapGpuVirtualAddress(wddmAllocation.get(), nullptr);
}
DEBUG_BREAK_IF(!status);
wddmAllocation->setCpuAddress(cpuPtr);
return wddmAllocation.release();