Repository navigation
fix(vk): slow resume and black HUD hearts on 4 GB cards: the texture squeeze waits while VMA's blocks have room - #1506
Merged
hckrman101 merged 1 commit intoNov 10, 2026
Conversation
rakefire-impala
force-pushed
the
fix/slow-resume-black-hearts-texture-squeeze
branch
from
November 10, 2026 10:50
ce1b9b3 to
9839a17
Compare
The 97% rule set the budget below the textures held every 10 frames while the driver's count was at its limit. Evicting frees space inside VMA's blocks, which the driver still counts, so the count stayed there and the budget shrank again: a ratchet. On a 4 GB RX 5500M (3337 of 3337 MB used, 1224 MB free in the blocks) a paused game, whose scene draws nothing, lost 1700 MB of textures in seconds and made them again on unpausing (a long wait). The HUD's GPU-drawn pieces went too and came back as black glyphs until an area change. Now that rule waits while the blocks hold an eighth of the allowance free; the rule that judges pressure net of that free space still evicts. The VRAM log line says "not squeezed" then. RX_VK_SQUEEZE_ALWAYS=1: as before. tests/test_texture_squeeze.py checks the rule, its switch and the log line.
rakefire-impala
force-pushed
the
fix/slow-resume-black-hearts-texture-squeeze
branch
from
November 10, 2026 11:31
9839a17 to
b16fce6
Compare
omgitsgela
pushed a commit
to omgitsgela/Hookshot-SteamDeck
that referenced
this pull request
Nov 10, 2026
Records the baseline being developed from, the two problems kept separate (P1 texture-loading lag, P2 rainbow+crash), the exact changes in the build under test (PR NotRexed#1505 retry/system-memory scratch, PR NotRexed#1506 eviction gate) with the runtime switch that A/Bs each, what we measure and from which log lines, success criteria, three falsifiable hypotheses, the operating rules learned the hard way, and current status.
omgitsgela
pushed a commit
to omgitsgela/Hookshot-SteamDeck
that referenced
this pull request
Nov 11, 2026
Patched renderer (clang 20) ran 5280 frames then hung at mesh program 1a81 with a driver SIGSEGV; VRAM was 2275/6140 MB with 524 MB free in blocks, so neither NotRexed#1505 nor NotRexed#1506 ever engaged. The 14:14 prebuilt-renderer log ends at the same program with the same 16 'not made' views, so this is the baseline's own hang, not a regression. Records that the prebuilt renderer is clang 23.1.5 while our builds use clang 20.1.8, that the AppImage sysroot has no C++ headers, and that libstdc++-13-dev supplies them for a clang-23 renderer build.
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At the driver's VRAM limit, the 97% texture "squeeze" kept shrinking the budget every 10 frames, even while VMA's blocks had plenty of free room. On a 4 GB card a paused game lost 1.7 GB of textures in seconds. This makes the rule wait while the blocks hold room.
A VRAM policy change, as the review of #1023 noted, so it's split out on its own. Tested on a 4 GB card; reports from other low-VRAM cards are welcome. Part of splitting up #1023.
Problem
At the driver's limit,
texture_frame's 97% rule set the texture budget below what the textures held, every 10 frames. Evicting a texture frees space inside VMA's blocks, but the driver still counts those blocks. So the count stayed at the limit, the rule fired again, and the budget shrank again: a ratchet.On an RX 5500M (3337 of 3337 MB used, with 1224 MB free inside the blocks), a paused game, whose scene draws nothing:
Change
(at the driver's limit, room in the blocks: not squeezed)when the rule waits.RX_VK_SQUEEZE_ALWAYS=1brings the old behaviour back.How to check
Pause the game for a minute on a low-VRAM card, or alt-tab away, then resume. Textures stay resident and resume is quick. The periodic
vk: VRAM:log lines show the "not squeezed" note while the blocks have room.Risk
The change only applies at the driver's limit with room in the blocks. Cards that never reach the limit behave as before, and the env var restores the old rule anywhere.
Tests
tests/test_texture_squeeze.py(new) checks the rule, its switch and the log line. It fails on main without this change.Tested on