mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
Optimize makeResident call.
Some portions only make sense in Batching mode. Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
fc0f600fd2
commit
2eb47bd73e
@@ -138,10 +138,12 @@ void CommandStreamReceiver::makeResident(GraphicsAllocation &gfxAllocation) {
|
|||||||
this->getResidencyAllocations().push_back(&gfxAllocation);
|
this->getResidencyAllocations().push_back(&gfxAllocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkForNewResources(submissionTaskCount, gfxAllocation.getTaskCount(osContext->getContextId()), gfxAllocation);
|
|
||||||
gfxAllocation.updateTaskCount(submissionTaskCount, osContext->getContextId());
|
gfxAllocation.updateTaskCount(submissionTaskCount, osContext->getContextId());
|
||||||
if (!gfxAllocation.isResident(osContext->getContextId())) {
|
if (this->dispatchMode == DispatchMode::BatchedDispatch) {
|
||||||
this->totalMemoryUsed += gfxAllocation.getUnderlyingBufferSize();
|
checkForNewResources(submissionTaskCount, gfxAllocation.getTaskCount(osContext->getContextId()), gfxAllocation);
|
||||||
|
if (!gfxAllocation.isResident(osContext->getContextId())) {
|
||||||
|
this->totalMemoryUsed += gfxAllocation.getUnderlyingBufferSize();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gfxAllocation.updateResidencyTaskCount(submissionTaskCount, osContext->getContextId());
|
gfxAllocation.updateResidencyTaskCount(submissionTaskCount, osContext->getContextId());
|
||||||
|
|||||||
Reference in New Issue
Block a user