mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
Prepare to switch to new residency model
Related-To: NEO-5007 Change-Id: Ia9b43ca7fea0ef315af5caff5a53a84ffc363937 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
c4fb85256f
commit
9ea9baf1ad
@@ -84,20 +84,8 @@ MemoryOperationsStatus DrmMemoryOperationsHandlerBind::isResident(Device *device
|
||||
}
|
||||
|
||||
void DrmMemoryOperationsHandlerBind::mergeWithResidencyContainer(OsContext *osContext, ResidencyContainer &residencyContainer) {
|
||||
if (DebugManager.flags.BindAllAllocations.get()) {
|
||||
this->makeResidentWithinOsContext(osContext, ArrayRef<GraphicsAllocation *>(residencyContainer));
|
||||
residencyContainer.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
for (auto gfxAllocation = residencyContainer.begin(); gfxAllocation != residencyContainer.end();) {
|
||||
if ((*gfxAllocation)->isAlwaysResident(osContext->getContextId())) {
|
||||
gfxAllocation = residencyContainer.erase(gfxAllocation);
|
||||
} else {
|
||||
gfxAllocation++;
|
||||
}
|
||||
}
|
||||
this->makeResidentWithinOsContext(osContext, ArrayRef<GraphicsAllocation *>(residencyContainer));
|
||||
residencyContainer.clear();
|
||||
}
|
||||
|
||||
std::unique_lock<std::mutex> DrmMemoryOperationsHandlerBind::lockHandlerForExecWA() {
|
||||
|
||||
Reference in New Issue
Block a user