Revert "feature: support SVM heap in reserveVirtualMem"

This reverts commit bfaeeb01d6.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2024-09-14 06:46:52 +02:00
committed by Compute-Runtime-Automation
parent 8154ce71ea
commit 41df1a6f47
18 changed files with 29 additions and 517 deletions

View File

@@ -40,6 +40,7 @@
#include "shared/source/os_interface/windows/wddm_allocation.h"
#include "shared/source/os_interface/windows/wddm_residency_allocations_container.h"
#include "shared/source/os_interface/windows/wddm_residency_controller.h"
#include "shared/source/release_helper/release_helper.h"
#include <algorithm>
#include <emmintrin.h>
@@ -73,7 +74,6 @@ WddmMemoryManager::WddmMemoryManager(ExecutionEnvironment &executionEnvironment)
if (customAlignment > 0) {
alignmentSelector.addCandidateAlignment(customAlignment, false, AlignmentSelector::anyWastage);
}
osMemory = OSMemory::create();
initialized = true;
}
@@ -1015,15 +1015,6 @@ void WddmMemoryManager::freeGpuAddress(AddressRange addressRange, uint32_t rootD
getWddm(rootDeviceIndex).freeGpuVirtualAddress(addressRange.address, addressRange.size);
}
AddressRange WddmMemoryManager::reserveCpuAddress(const uint64_t requiredStartAddress, size_t size) {
void *ptr = osMemory->osReserveCpuAddressRange(addrToPtr(requiredStartAddress), size, false);
return {castToUint64(ptr), size};
}
void WddmMemoryManager::freeCpuAddress(AddressRange addressRange) {
osMemory->osReleaseCpuAddressRange(addrToPtr(addressRange.address), addressRange.size);
}
bool WddmMemoryManager::mapGpuVaForOneHandleAllocation(WddmAllocation *allocation, const void *preferredGpuVirtualAddress) {
D3DGPU_VIRTUAL_ADDRESS addressToMap = castToUint64(preferredGpuVirtualAddress);
auto heapIndex = selectHeap(allocation, preferredGpuVirtualAddress != nullptr, is32bit || executionEnvironment.rootDeviceEnvironments[allocation->getRootDeviceIndex()]->isFullRangeSvm(), allocation->isAllocInFrontWindowPool());