mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
Add support for deletion of allocations that may be in use by GPU.
- fix deletion of constant program surface - fix deletion of global program surface - move program_data tests to shared code - make program_data tests SKU agnostic Change-Id: Icf3e9fd035416072699336c4f86e49703ef48cc5
This commit is contained in:
committed by
sys_ocldev
parent
d91d01fedd
commit
0066daf495
@@ -253,6 +253,15 @@ void MemoryManager::clearEvictionAllocations() {
|
||||
void MemoryManager::freeGraphicsMemory(GraphicsAllocation *gfxAllocation) {
|
||||
freeGraphicsMemoryImpl(gfxAllocation);
|
||||
}
|
||||
//if not in use destroy in place
|
||||
//if in use pass to temporary allocation list that is cleaned on blocking calls
|
||||
void MemoryManager::checkGpuUsageAndDestroyGraphicsAllocations(GraphicsAllocation *gfxAllocation) {
|
||||
if (gfxAllocation->taskCount == ObjectNotUsed || gfxAllocation->taskCount <= *csr->getTagAddress()) {
|
||||
freeGraphicsMemory(gfxAllocation);
|
||||
} else {
|
||||
storeAllocation(std::unique_ptr<GraphicsAllocation>(gfxAllocation), TEMPORARY_ALLOCATION);
|
||||
}
|
||||
}
|
||||
|
||||
void MemoryManager::waitForDeletions() {
|
||||
if (deferredDeleter) {
|
||||
|
||||
Reference in New Issue
Block a user