mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
refactor: move memory tracking to memory manager
- remove wddm specific code - improve total size reported to be in decimal Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c0d9cb4d84
commit
dd631610b3
@@ -955,16 +955,6 @@ double WddmMemoryManager::getPercentOfGlobalMemoryAvailable(uint32_t rootDeviceI
|
||||
return 0.94;
|
||||
}
|
||||
|
||||
AllocationStatus WddmMemoryManager::registerSysMemAlloc(GraphicsAllocation *allocation) {
|
||||
this->sysMemAllocsSize += allocation->getUnderlyingBufferSize();
|
||||
return AllocationStatus::Success;
|
||||
}
|
||||
|
||||
AllocationStatus WddmMemoryManager::registerLocalMemAlloc(GraphicsAllocation *allocation, uint32_t rootDeviceIndex) {
|
||||
this->localMemAllocsSize[rootDeviceIndex] += allocation->getUnderlyingBufferSize();
|
||||
return AllocationStatus::Success;
|
||||
}
|
||||
|
||||
AlignedMallocRestrictions *WddmMemoryManager::getAlignedMallocRestrictions() {
|
||||
return &mallocRestrictions;
|
||||
}
|
||||
|
||||
@@ -50,8 +50,6 @@ class WddmMemoryManager : public MemoryManager {
|
||||
uint64_t getSystemSharedMemory(uint32_t rootDeviceIndex) override;
|
||||
uint64_t getLocalMemorySize(uint32_t rootDeviceIndex, uint32_t deviceBitfield) override;
|
||||
double getPercentOfGlobalMemoryAvailable(uint32_t rootDeviceIndex) override;
|
||||
AllocationStatus registerSysMemAlloc(GraphicsAllocation *allocation) override;
|
||||
AllocationStatus registerLocalMemAlloc(GraphicsAllocation *allocation, uint32_t rootDeviceIndex) override;
|
||||
|
||||
bool tryDeferDeletions(const D3DKMT_HANDLE *handles, uint32_t allocationCount, D3DKMT_HANDLE resourceHandle, uint32_t rootDeviceIndex);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user