Add support for many GMMs in Graphics Allocation

Change-Id: I955b8dd50b502f91700c5529d0a0a291632aa157
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2019-03-12 13:24:58 +01:00
committed by sys_ocldev
parent 40541e4faa
commit 395e79fee8
45 changed files with 217 additions and 205 deletions

View File

@@ -290,7 +290,7 @@ bool Wddm::makeResident(const D3DKMT_HANDLE *handles, uint32_t count, bool cantT
bool Wddm::mapGpuVirtualAddress(WddmAllocation *allocation, void *cpuPtr) {
void *mapPtr = allocation->getReservedAddress() != nullptr ? allocation->getReservedAddress() : cpuPtr;
return mapGpuVirtualAddressImpl(allocation->gmm, allocation->getDefaultHandle(), mapPtr, allocation->getGpuAddressToModify(),
return mapGpuVirtualAddressImpl(allocation->getDefaultGmm(), allocation->getDefaultHandle(), mapPtr, allocation->getGpuAddressToModify(),
MemoryManager::selectHeap(allocation, mapPtr, *hardwareInfoTable[gfxPlatform->eProductFamily]));
}
@@ -594,7 +594,7 @@ bool Wddm::openSharedHandle(D3DKMT_HANDLE handle, WddmAllocation *alloc) {
alloc->resourceHandle = OpenResource.hResource;
auto resourceInfo = const_cast<void *>(allocationInfo[0].pPrivateDriverData);
alloc->gmm = new Gmm(static_cast<GMM_RESOURCE_INFO *>(resourceInfo));
alloc->setDefaultGmm(new Gmm(static_cast<GMM_RESOURCE_INFO *>(resourceInfo)));
return true;
}
@@ -631,7 +631,7 @@ bool Wddm::openNTHandle(HANDLE handle, WddmAllocation *alloc) {
alloc->resourceHandle = openResourceFromNtHandle.hResource;
auto resourceInfo = const_cast<void *>(allocationInfo2[0].pPrivateDriverData);
alloc->gmm = new Gmm(static_cast<GMM_RESOURCE_INFO *>(resourceInfo));
alloc->setDefaultGmm(new Gmm(static_cast<GMM_RESOURCE_INFO *>(resourceInfo)));
return true;
}