diff options
| author | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-11-01 12:18:26 -0500 |
|---|---|---|
| committer | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-11-01 12:18:26 -0500 |
| commit | f398ff2e17f4e86701b698e68886e09d387889af (patch) | |
| tree | d58abef1adc20530e4f99219a4f5eeaf880bbb28 /src/video_core | |
| parent | 6bde8c20d1f7c020a920e59a989c03822a08445d (diff) | |
texture_cache: free the slots of deleted allocations and framebuffers
Deleting the last image of an allocation erased its lookup but kept its
slot, and removing a framebuffer moved it to the deletion queue but kept
its slot, so both slot vectors grew with every allocation and
framebuffer ever made (title 1: 8.3k allocations and 1k framebuffers
made in its first 4 minutes, 5.2k and 600 alive).
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 33ca051482..e0cc2fc517 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -2982,6 +2982,7 @@ void TextureCache<P>::DeleteImage(ImageId image_id, bool immediate_delete) { alloc_images.erase(alloc_image_it); if (alloc_images.empty()) { image_allocs_table.erase(alloc_it); + slot_image_allocs.erase(alloc_id); } for (size_t c : active_channel_ids) { auto& channel_info = channel_storage[c]; @@ -3023,6 +3024,7 @@ void TextureCache<P>::RemoveFramebuffers(std::span<const ImageViewId> removed_vi last_framebuffer_serial = 0; } sentenced_framebuffers.Push(std::move(slot_framebuffers[framebuffer_id])); + slot_framebuffers.erase(framebuffer_id); it = framebuffers.erase(it); } else { ++it; |
