Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/gpgmm/d3d12/ResourceAllocationD3D12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ namespace gpgmm::d3d12 {
"call Unmap the same number of times as Map before releasing the resource "
"allocation.";
}

// If the developer forgots to unlock the heap, do so now so the heap can be made eligable
// for eviction.
if (mResidencyManager != nullptr) {
mResidencyManager->UnlockHeap(GetMemory());
WarnLog(MessageId::kPerformanceWarning, this)
<< "Destroying a locked resource allocation is allowed but discouraged. Please "
"call UnlockHeap the same number of times as LockHeap before releasing the "
"resource "
"allocation.";
}
}

void ResourceAllocation::DeleteThis() {
Expand Down