mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-27 07:44:16 +08:00
Remove debug flag ForceResourceLockOnTransferCalls
Unlock locked resoures in freeGraphicsMemory method Change-Id: I2baae7b7f9d8260f19a4b083849c5bf0d1a764f3 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
82046c25d2
commit
128bf4552f
@@ -137,6 +137,9 @@ void MemoryManager::freeGraphicsMemory(GraphicsAllocation *gfxAllocation) {
|
||||
if (!gfxAllocation) {
|
||||
return;
|
||||
}
|
||||
if (gfxAllocation->isLocked()) {
|
||||
unlockResource(gfxAllocation);
|
||||
}
|
||||
freeGraphicsMemoryImpl(gfxAllocation);
|
||||
}
|
||||
//if not in use destroy in place
|
||||
@@ -353,9 +356,11 @@ void *MemoryManager::lockResource(GraphicsAllocation *graphicsAllocation) {
|
||||
if (!graphicsAllocation) {
|
||||
return nullptr;
|
||||
}
|
||||
DEBUG_BREAK_IF(graphicsAllocation->isLocked());
|
||||
if (graphicsAllocation->isLocked()) {
|
||||
return graphicsAllocation->getLockedPtr();
|
||||
}
|
||||
auto retVal = lockResourceImpl(*graphicsAllocation);
|
||||
graphicsAllocation->setLocked(true);
|
||||
graphicsAllocation->lock(retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
@@ -365,6 +370,6 @@ void MemoryManager::unlockResource(GraphicsAllocation *graphicsAllocation) {
|
||||
}
|
||||
DEBUG_BREAK_IF(!graphicsAllocation->isLocked());
|
||||
unlockResourceImpl(*graphicsAllocation);
|
||||
graphicsAllocation->setLocked(false);
|
||||
graphicsAllocation->unlock();
|
||||
}
|
||||
} // namespace OCLRT
|
||||
|
||||
Reference in New Issue
Block a user