Delegate all MemoryManager::pushAllocationForResidency() calls through CSR

This prepares for moving this method from MemoryManager to CSR.

Change-Id: I82393289c48990f26ed3ac922bcd64e2b6c11f28
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2018-09-11 16:14:07 +02:00
committed by sys_ocldev
parent a416b0a382
commit 81a1e435f9
4 changed files with 30 additions and 59 deletions

View File

@@ -68,7 +68,7 @@ CommandStreamReceiver::~CommandStreamReceiver() {
void CommandStreamReceiver::makeResident(GraphicsAllocation &gfxAllocation) {
auto submissionTaskCount = this->taskCount + 1;
if (gfxAllocation.residencyTaskCount < (int)submissionTaskCount) {
getMemoryManager()->pushAllocationForResidency(&gfxAllocation);
this->pushAllocationForResidency(&gfxAllocation);
gfxAllocation.taskCount = submissionTaskCount;
if (gfxAllocation.residencyTaskCount == ObjectNotResident) {
this->totalMemoryUsed += gfxAllocation.getUnderlyingBufferSize();
@@ -268,6 +268,10 @@ ResidencyContainer &CommandStreamReceiver::getResidencyAllocations() {
return this->memoryManager->getResidencyAllocations();
}
void CommandStreamReceiver::pushAllocationForResidency(GraphicsAllocation *gfxAllocation) {
this->memoryManager->pushAllocationForResidency(gfxAllocation);
}
void CommandStreamReceiver::activateAubSubCapture(const MultiDispatchInfo &dispatchInfo) {}
GraphicsAllocation *CommandStreamReceiver::allocateDebugSurface(size_t size) {

View File

@@ -90,6 +90,7 @@ class CommandStreamReceiver {
void setMemoryManager(MemoryManager *mm);
ResidencyContainer &getResidencyAllocations();
void pushAllocationForResidency(GraphicsAllocation *gfxAllocation);
virtual GmmPageTableMngr *createPageTableManager() { return nullptr; }