mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-27 08:12:33 +00:00
Vulkan: Free texture slabs on exit.
This commit is contained in:
parent
16570f10bd
commit
3352608027
@ -113,7 +113,13 @@ VulkanDeviceAllocator::~VulkanDeviceAllocator() {
|
||||
void VulkanDeviceAllocator::Destroy() {
|
||||
for (Slab &slab : slabs_) {
|
||||
// Did anyone forget to free?
|
||||
assert(slab.allocSizes.empty());
|
||||
for (auto pair : slab.allocSizes) {
|
||||
if (slab.usage[pair.first] != 2) {
|
||||
// If it's not 2 (queued), there's a problem.
|
||||
// If it's zero, it means allocSizes is somehow out of sync.
|
||||
Crash();
|
||||
}
|
||||
}
|
||||
|
||||
vulkan_->Delete().QueueDeleteDeviceMemory(slab.deviceMemory);
|
||||
}
|
||||
|
@ -149,6 +149,7 @@ TextureCacheVulkan::TextureCacheVulkan(VulkanContext *vulkan)
|
||||
|
||||
TextureCacheVulkan::~TextureCacheVulkan() {
|
||||
Clear(true);
|
||||
allocator_->Destroy();
|
||||
}
|
||||
|
||||
void TextureCacheVulkan::DownloadFramebufferForClut(u32 clutAddr, u32 bytes) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user