mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 07:00:17 +08:00
Add support for deferred deletion of private surface.
- If it is in use add it to temporary allocation list - If it is not in use destroy in place Change-Id: I6304d1a3b641243f3f7eadff8e38d8515b132f68
This commit is contained in:
committed by
sys_ocldev
parent
3e84c4df7a
commit
c6233e1d06
@@ -114,7 +114,11 @@ Kernel::~Kernel() {
|
||||
crossThreadDataSize = 0;
|
||||
|
||||
if (privateSurface) {
|
||||
device.getMemoryManager()->freeGraphicsMemory(privateSurface);
|
||||
if (privateSurface->taskCount == ObjectNotUsed || privateSurface->taskCount <= *device.getTagAddress()) {
|
||||
device.getMemoryManager()->freeGraphicsMemory(privateSurface);
|
||||
} else {
|
||||
device.getMemoryManager()->storeAllocation(std::unique_ptr<GraphicsAllocation>(privateSurface), TEMPORARY_ALLOCATION);
|
||||
}
|
||||
privateSurface = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user