aboutsummaryrefslogtreecommitdiff
path: root/src/common/zstd_compression.cpp
diff options
context:
space:
mode:
authorWael3rd <29479851+Wael3rd@users.noreply.github.com>2026-10-31 07:34:14 +0100
committerkraibse <33869366+kraibse@users.noreply.github.com>2026-10-31 18:04:23 +0100
commit2065b1431c0ecfeade61a7e7511889c4800b6bb9 (patch)
treeb38d89592c3cb1fe802089d13a8231a2adeefd6a /src/common/zstd_compression.cpp
parentee2d55ee497c9467c8df82515165a21eac13fff5 (diff)
texture_cache: keep Switch 2 VRAM use under the driver's budget
Mario Kart World filled the GPU after a few minutes on 8 GB cards, and on 16 GB cards with uncompressed ASTC: textures were created without memory (garbage), then the emulator crashed. The Switch 2 collector thresholds came from the sum of all heap budgets, but on AMD the host-visible device-local heap is the same VRAM, so the critical threshold ended above the real budget and the collector never kicked in. Unbacked images were also counted at their full size. Thresholds now follow the main device-local heap's budget, re-read every 30 frames, and images count the memory they really have. Switch 2 titles on GPUs under 12 GiB re-compress ASTC to BC3 for the session when it is set to Uncompressed (EDEN_NX2_KEEP_ASTC=1 opts out), and EDEN_NX2_VRAM_LIMIT_MIB simulates a smaller GPU for testing. Assisted-by: Claude Opus 5.5 (diagnosis and code)
Diffstat (limited to 'src/common/zstd_compression.cpp')
0 files changed, 0 insertions, 0 deletions