Allow to reuse just completed allocation

Change-Id: I7c1ab153178b79348d49209ca09478543d35e197
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2018-11-06 09:07:10 +01:00
committed by sys_ocldev
parent 337d374bc5
commit 630a7e1c26
2 changed files with 23 additions and 4 deletions

View File

@@ -86,7 +86,7 @@ GraphicsAllocation *AllocationsList::detachAllocationImpl(GraphicsAllocation *,
auto currentTagValue = *req->csrTagAddress;
if ((req->internalAllocationRequired == curr->is32BitAllocation) &&
(curr->getUnderlyingBufferSize() >= req->requiredMinimalSize) &&
((currentTagValue > curr->getTaskCount(req->contextId)) || (curr->getTaskCount(req->contextId) == 0))) {
(currentTagValue >= curr->getTaskCount(req->contextId))) {
return removeOneImpl(curr, nullptr);
}
curr = curr->next;