SWDEV-322620 - Virtual Memory Management

Add a virtualMemoryManagement_ flag to device.info.

Change-Id: Iabd039010d83fc51b4bcef600c609f5c65e7b1ae


[ROCm/clr commit: b4645c7d4e]
This commit is contained in:
Christophe Paquot
2022-05-06 17:28:51 -07:00
parent f8a4c3c29f
commit 2c3faaa3a0
4 changed files with 10 additions and 0 deletions
@@ -465,6 +465,9 @@ void Resource::memTypeToHeap(Pal::GpuMemoryCreateInfo* createInfo) {
createInfo->heaps[2] = Pal::GpuHeapGartUswc;
createInfo->flags.peerWritable = dev().P2PAccessAllowed();
break;
case VaRange:
createInfo->heapCount = 0;
break;
default:
createInfo->heaps[0] = Pal::GpuHeapLocal;
break;
@@ -1272,6 +1275,9 @@ bool Resource::create(MemoryType memType, CreateParams* params, bool forceLinear
memRef_->cpuAddress_ = nullptr;
mapCount_++;
}
if (memoryType() == VaRange) {
params->owner_->setSvmPtr(reinterpret_cast<void*>(memRef_->iMem()->Desc().gpuVirtAddr));
}
return true;
}