diff options
| author | Zephyron <zephyron@citron-emu.org> | 2025-04-20 17:39:14 +1000 |
|---|---|---|
| committer | Mike Lothian <mike@fireburn.co.uk> | 2025-05-12 12:46:19 +0100 |
| commit | 00f7ddafa3221c5f62926c6b22fed604e180c6ec (patch) | |
| tree | 1bd64bdf18402c6cdacd035b379463b3f73c95f9 /src/video_core/buffer_cache/buffer_cache.h | |
| parent | 654f4c4fe35d8393e345e831549c8b7b05a7b647 (diff) | |
video_core: Improve texture cache memory management to prevent leaks
Implement several improvements to the texture cache memory management system
to address memory leaks that occur in memory-intensive games like TOTK
(Title ID 0100F2C0115B6000). These changes prevent the gradual memory
increase that eventually leads to crashes or undefined behavior.
Key improvements:
- Enhance garbage collection with more aggressive cleanup thresholds
- Add emergency resource cleanup for persistent high memory usage
- Improve DeleteImage to ensure proper resource deallocation
- Make DelayedDestructionRing thread-safe with proper mutex protection
- Track consecutive high-memory frames to detect potential leaks
- Add emergency cleanup mechanism for extreme memory pressure situations
- Use proper type casting in std::max to fix compilation errors
This should significantly improve stability during extended gameplay
sessions with memory-intensive titles.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Diffstat (limited to 'src/video_core/buffer_cache/buffer_cache.h')
0 files changed, 0 insertions, 0 deletions
