mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
fix: change mutex when destroying allocation
Current mutex is not preventing destroying resources when trim callback is currently evicting same allocation. New mutex does. Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c645e142b9
commit
7628966f80
@@ -720,7 +720,7 @@ void WddmMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation
|
||||
auto ®isteredEngines = getRegisteredEngines(gfxAllocation->getRootDeviceIndex());
|
||||
for (auto &engine : registeredEngines) {
|
||||
auto &residencyController = static_cast<OsContextWin *>(engine.osContext)->getResidencyController();
|
||||
auto lock = residencyController.acquireLock();
|
||||
auto lock = residencyController.acquireTrimCallbackLock();
|
||||
auto &evictContainer = engine.commandStreamReceiver->getEvictionAllocations();
|
||||
auto iter = std::find(evictContainer.begin(), evictContainer.end(), gfxAllocation);
|
||||
if (iter != evictContainer.end()) {
|
||||
|
||||
Reference in New Issue
Block a user