mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
Minor refactoring related to residency task count
Change-Id: I49c9a5b37637e19fa12b7e6d91c352fb78bb117a Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
068582445d
commit
b138ff5750
@@ -63,11 +63,10 @@ CommandStreamReceiver::~CommandStreamReceiver() {
|
||||
|
||||
void CommandStreamReceiver::makeResident(GraphicsAllocation &gfxAllocation) {
|
||||
auto submissionTaskCount = this->taskCount + 1;
|
||||
bool isNotResident = !gfxAllocation.isResident(osContext->getContextId());
|
||||
if (isNotResident || gfxAllocation.getResidencyTaskCount(osContext->getContextId()) < submissionTaskCount) {
|
||||
if (gfxAllocation.isResidencyTaskCountBelow(submissionTaskCount, osContext->getContextId())) {
|
||||
this->getResidencyAllocations().push_back(&gfxAllocation);
|
||||
gfxAllocation.updateTaskCount(submissionTaskCount, osContext->getContextId());
|
||||
if (isNotResident) {
|
||||
if (!gfxAllocation.isResident(osContext->getContextId())) {
|
||||
this->totalMemoryUsed += gfxAllocation.getUnderlyingBufferSize();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user