mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
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:
committed by
sys_ocldev
parent
40541e4faa
commit
395e79fee8
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user