mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-18 22:08:53 +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);
|
||||
}
|
||||
|
||||
checkForNewResources(submissionTaskCount, gfxAllocation.getTaskCount(osContext->getContextId()), gfxAllocation);
|
||||
gfxAllocation.updateTaskCount(submissionTaskCount, osContext->getContextId());
|
||||
if (!gfxAllocation.isResident(osContext->getContextId())) {
|
||||
this->totalMemoryUsed += gfxAllocation.getUnderlyingBufferSize();
|
||||
if (this->dispatchMode == DispatchMode::BatchedDispatch) {
|
||||
checkForNewResources(submissionTaskCount, gfxAllocation.getTaskCount(osContext->getContextId()), gfxAllocation);
|
||||
if (!gfxAllocation.isResident(osContext->getContextId())) {
|
||||
this->totalMemoryUsed += gfxAllocation.getUnderlyingBufferSize();
|
||||
}
|
||||
}
|
||||
}
|
||||
gfxAllocation.updateResidencyTaskCount(submissionTaskCount, osContext->getContextId());
|
||||
|
||||
Reference in New Issue
Block a user