play: hold memory back for the texture line whenever frame generation is not running #4213
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4213
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4212"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Kassadd on GitHub · 2026-11-30 17:27 UTC · original
Kassadd:pr-texture-line→main· +820 −828 · 32 files · 11 commits · closed without mergingplay: hold memory back for the texture line whenever frame generation is not running
What it changes
settings()holds 1.5 to 2 GB of the card's memory back from the texture pool by settingVICTORY_TEXTURE_ROOM_PERCENT(80with frame generation,86without) andVICTORY_FRAMEGEN_ROOM_RESERVE=1.Those two lines sat inside
if let Some(x) = framegen_x, which is onlySomewhen framegeneration was asked for or made ready. So they were skipped in two configurations:
--dlss off, which is whatdocs/linux-proton.mdtells Linux users to run (framegeneration does not work under Wine), and
--dlss qualitywithout frame generation — and this one I only found by running it.This moves them out, to
if framegen_x.is_none()— the branch where nothing above askedfor them. The two lines themselves are unchanged, with the same values and the same meaning.
What it looks like in a run
Under
umu-runon a 16 GiB card at 4K output, with--dlss qualityand no frame generation,the layer's own line read:
94.4 %, not 86. The layer's line was
line_for— budget less 768 MiB or a twentieth,floored at 90 % — and the card sat at 15,376 of 16,376 MB. The switch dump for that run
has
VICTORY_DLSS=1andVICTORY_MENU_DLSS=quality, and noVICTORY_TEXTURE_ROOM_PERCENTat all.
With the cap applied another way on the same card (
VICTORY_VRAM_BUDGET_MB=12800), the cardsat at 12.5 GB and the worst world frame went from 264 ms to 86 ms — same median,
64 ms, but the variance gone. That is the failure this is aimed at:
device lost(
0x887A0005) and a refused command list (0x8007000E) stop being reachable for want of afew hundred MB.
How it was tested
play::tests::without_frame_generation_the_texture_line_is_still_held_backcovers all three cases: DLSS on with no frame generation, DLSS off, and frame generation
made ready (which keeps the old behaviour).
play::tests: 32 passed, 0 failed, run under Wine on the Windows test binary.a_plain_start_is_the_launchersandwithout_nvidias_files_there_is_no_dlssboth said!contains_key("VICTORY_TEXTURE_ROOM_PERCENT").Updated with a comment saying why: the reserve is not part of the Streamline path, it
is the memory the texture queue holds back on its own, and it does not need a swap chain.
x86_64-pc-windows-msvc; thevictorybin's tests build onmain84bd61e.On the
8686reads like "a little less than 80", and with no backend to make room for it collapses to80 anyway:
room_line_forreturnsbudget / 100 * percent.unwrap_or(80).min(80)when thereserve is asked for and frame generation is unavailable. So
86+ the reserve is 80 % inpractice — the value
mainalready reaches on a machine with DLSS and frame generation off.This takes the same route rather than inventing a third number.
Checked for overlap
145f772): thevictory-gpulib tests did not compile onmain(card_passgained a sixth argument, two test call sites passed five). Unrelated.shadow.rs, AMD windows) does interact:window_linetakesresource::room_line(budget)as its cap, and its own comment names"
VICTORY_TEXTURE_ROOM_PERCENT86 or 80, 1.5 to 2 GB" as the room it keeps free ofwindows. Making the line 80 % where it was
line_fortherefore lowers the window cap byabout 2 GB on a 16 GiB card too. Both pull the same way — leave the card room — but this
is a second effect, and on the AMD cards #4190 is about I have not measured whether the
windows end up short. If that is a concern, gating on
streamline.is_none()would keepthis PR to the
--dlss offcase only.94dc7e9) keeps 512 MB free inside the line; this changes whichline. Different lever, no conflict.
Not done
reached with
VICTORY_VRAM_BUDGET_MB=12800, not from this change.frame) but was no faster than
--dlss offon this machine: the frame is bounded by thelayer's copies, not by the card. That is why the
--dlss offcase matters and is the onedocs/linux-proton.mddocuments.play: hold memory back for the texture line with no upscaler too (--dlss off left it at line_for)to play: hold memory back for the texture line whenever frame generation is not running3f162b6c0ato45d3e9d873Pull request closed