Delegate MemoryManager residency and eviction calls through CSR

MemoryManager::getEvictonAllocations()
MemoryManager::pushAllocationForEviction()
MemoryManager::clearEvictionAllocations()
MemoryManager::clearResidencyAllocations()

Change-Id: Iaa3051965bc9dfc09384e2bd5e9e0c372b5e722a
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2018-09-12 10:44:35 +02:00
committed by sys_ocldev
parent 7aa70248e8
commit da5a292e54
9 changed files with 46 additions and 25 deletions

View File

@@ -159,8 +159,8 @@ void WddmCommandStreamReceiver<GfxFamily>::processResidency(ResidencyContainer *
template <typename GfxFamily>
void WddmCommandStreamReceiver<GfxFamily>::processEviction() {
getMemoryManager()->makeNonResidentEvictionAllocations();
getMemoryManager()->clearEvictionAllocations();
getMemoryManager()->makeNonResidentEvictionAllocations(this->getEvictionAllocations());
this->clearEvictionAllocations();
}
template <typename GfxFamily>

View File

@@ -547,7 +547,7 @@ bool WddmMemoryManager::makeResidentResidencyAllocations(ResidencyContainer *all
return result;
}
void WddmMemoryManager::makeNonResidentEvictionAllocations() {
void WddmMemoryManager::makeNonResidentEvictionAllocations(ResidencyContainer &evictionAllocations) {
acquireResidencyLock();

View File

@@ -65,7 +65,7 @@ class WddmMemoryManager : public MemoryManager {
void unlockResource(GraphicsAllocation *graphicsAllocation) override;
bool makeResidentResidencyAllocations(ResidencyContainer *allocationsForResidency, OsContext &osContext);
void makeNonResidentEvictionAllocations();
void makeNonResidentEvictionAllocations(ResidencyContainer &evictionAllocations);
AllocationStatus populateOsHandles(OsHandleStorage &handleStorage) override;
void cleanOsHandles(OsHandleStorage &handleStorage) override;