Fix allocating small buffers from pool

Wait for engine completion before freeing from pool

Related-To: NEO-7332

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2022-11-16 14:59:35 +00:00
committed by Compute-Runtime-Automation
parent d9d706d747
commit 0cea7fe6d1
2 changed files with 21 additions and 0 deletions

View File

@@ -94,6 +94,8 @@ MemObj::~MemObj() {
}
destroyGraphicsAllocation(graphicsAllocation, doAsyncDestructions);
graphicsAllocation = nullptr;
} else if (graphicsAllocation && context->getBufferPoolAllocator().isPoolBuffer(associatedMemObject)) {
memoryManager->waitForEnginesCompletion(*graphicsAllocation);
}
if (!associatedMemObject) {
releaseMapAllocation(rootDeviceIndex, doAsyncDestructions);