mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Dont force system memory for internal allocations
use HEAP_INTERNAL_DEVICE_MEMORY for internal allocations Change-Id: Id70caa30cd1e9c79df60773227d72b09541e4b77 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
ce4a75e121
commit
fff8be32f4
@@ -999,7 +999,7 @@ std::unique_lock<SpinLock> Wddm::acquireLock(SpinLock &lock) {
|
||||
HeapIndex Wddm::selectHeap(const WddmAllocation *allocation, const void *ptr) const {
|
||||
if (allocation) {
|
||||
if (allocation->origin == AllocationOrigin::INTERNAL_ALLOCATION) {
|
||||
return HeapIndex::HEAP_INTERNAL;
|
||||
return HeapIndex::HEAP_INTERNAL_DEVICE_MEMORY;
|
||||
} else if (allocation->is32BitAllocation) {
|
||||
return HeapIndex::HEAP_EXTERNAL;
|
||||
}
|
||||
|
||||
@@ -80,6 +80,7 @@ class WddmAllocation : public GraphicsAllocation {
|
||||
this->reservedAddressSpace = reserveMem;
|
||||
}
|
||||
void setGpuAddress(uint64_t graphicsAddress) { this->gpuAddress = graphicsAddress; }
|
||||
void setCpuAddress(void *cpuPtr) { this->cpuPtr = cpuPtr; }
|
||||
bool needsMakeResidentBeforeLock = false;
|
||||
AllocationOrigin origin = AllocationOrigin::EXTERNAL_ALLOCATION;
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ GraphicsAllocation *WddmMemoryManager::allocate32BitGraphicsMemoryImpl(const All
|
||||
}
|
||||
|
||||
wddmAllocation->is32BitAllocation = true;
|
||||
auto baseAddress = allocationData.allocationOrigin == AllocationOrigin::EXTERNAL_ALLOCATION ? allocator32Bit->getBase() : this->wddm->getGfxPartition().Heap32[1].Base;
|
||||
auto baseAddress = allocationData.allocationOrigin == AllocationOrigin::EXTERNAL_ALLOCATION ? allocator32Bit->getBase() : getInternalHeapBaseAddress();
|
||||
wddmAllocation->gpuBaseAddress = GmmHelper::canonize(baseAddress);
|
||||
|
||||
DebugManager.logAllocation(wddmAllocation.get());
|
||||
@@ -450,7 +450,7 @@ uint64_t WddmMemoryManager::getMaxApplicationAddress() {
|
||||
}
|
||||
|
||||
uint64_t WddmMemoryManager::getInternalHeapBaseAddress() {
|
||||
return this->wddm->getGfxPartition().Heap32[1].Base;
|
||||
return this->wddm->getGfxPartition().Heap32[static_cast<uint32_t>(HeapIndex::HEAP_INTERNAL_DEVICE_MEMORY)].Base;
|
||||
}
|
||||
|
||||
bool WddmMemoryManager::mapAuxGpuVA(GraphicsAllocation *graphicsAllocation) {
|
||||
|
||||
Reference in New Issue
Block a user