Textures on a full card: small levels instead of waiting (VICTORY_SMALL_WHEN_FULL) #2493
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!2493
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2493"
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?
@cxchhh on GitHub · 2026-11-29 13:36 UTC · original
cxchhh:pr-small-textures→main· +508 −18 · 4 files · 1 commits · merged 2026-11-30 14:12 UTCProblem
With the card past the texture queue's line, a texture the title fills that has no host copy yet waits for room, and its slot shows the neutral texture or whatever it showed before.
room_for_first_uploadlets some of these through just over the line; the rest wait. On an RTX 4070 (12 GB, 4K output, DLSS performance, frame generation 2x), that showed up as white and green faces, black models indoors, and wrong textures in long sessions.Change
A texture that is not admitted whole now gets a host copy of its small levels only, instead of waiting:
make_small: the copy starts at the first level whose console layout fits inVICTORY_SMALL_COPY_KB(256 KiB by default). A single-level texture that small is made whole. Works for placed views (throughtexture_at) and shader views alike. At most 512 per pass, and only while the card is under 97 % of its budget.grow_small: with room again, or into free texture-pool blocks above 512 MiB, small copies are marked due (64 MB of console layout per pass). The next pass then remakes them with the levels their views ask for, and the slots keep showing the small copy until that upload has run.from_base: views count from the first level of their host copy for 2D array views too, and never ask for more levels than the copy has.VICTORY_SMALL_WHEN_FULL=0restores the old waiting. The memory line counts the textures made small, the ones that grew, and why a texture was not made small.Testing
cargo test -p victory-gpu --lib: 918 passed, 0 failed. New tests:a_small_copy_keeps_only_the_small_levelsand thefrom_basecases.texture.rs:3491(wrapping_mulon an ambiguous integer). That error is pre-existing onmainand the change is not part of this PR.cargo clippy -p victory-gpu --lib: no new warnings from these lines.victory-shaderonmainalready has three clippy findings.cargo xtask policy: the only violation is the existing one inheap_sites/frame_users.rs.room_for_first_uploadrefuses, so below the line nothing changes.Note: a separate regression (not addressed here)
While testing, I compared v2026.11.28.03 with v2026.11.29.01 on the same save, standing in the same indoor room, with the same launcher switches (play-foxhound defaults):
VICTORY_AMBIENT_CHROMA_SCRUB=1, and they also stay withVICTORY_AMBIENT=0. So they are not the light estimate; they come from something in the merge waves between the two releases. Translator changes there (quad reads in divergent flow, the wave64 wave-wide form, the LDS fallback) are the likeliest candidates. I haven't bisected it yet.🤖 Generated with Claude Code
@spook40 on GitHub · 2026-11-29 16:32 UTC · original · edited 2026-11-29 16:36 UTC
Tested this branch on an RTX 3060 Ti (8 GB) / 32 GB RAM / Windows 11 (
--res 1080to1440,VICTORY_POOL_SMALL=1,VICTORY_TEXTURE_FIRST_UPLOAD_MB=64) since your 4070 didn't hit the 80% line yet.On 8 GB in the city, VRAM quickly oversubscribes (
7,527 MBused of a6,933 MBbudget), which keeps the card permanently past the 97% cutoff somake_smallnever fires:textures made from their small levels for want of room (VICTORY_SMALL_WHEN_FULL), since the start: 0not made small: switch off 247371 ... the card past 97 % 1031409At the same time,
VICTORY_SLOT_EVICTevicted0textures (19385 not to be taken), shared GPU memory climbed to8,080 MB, system RAM dropped to306 MBfree (24.5 GBprivate /37.4 GBcommitted), and102mesh pipelines failed with0x8007000E(E_OUTOFMEMORY). Performance sat at6.7 fps(148.8 ms/frame).@Mikey970 on GitHub · 2026-11-30 05:57 UTC · original
Data point in favour of this approach, from a fork that runs the same idea (independently written,
VICTORY_SMALL_WHEN_FULL; branchwp/perf-aon Mikey970/VIctory-NVIDIA).Setup: RTX 4080 16 GB, 32 GB RAM, Series X profile, 1080p rendered to 4K (DLSS), ray tracing off, the 375 s Chapter 1 route (interrogation, therapist, flyover, boat, shore), warm pipeline cache.
Happy to turn the adaptive total into a follow-up PR on top of this one if it is wanted.
🤖 Generated with Claude Code
@ballsimulation on GitHub · 2026-11-30 10:50 UTC · original
With this PR in a build, the prologue crashes with
a host command list did not close (0x80070057)on an RTX 4070 12 GB. Without it, it doesn't.Setup: RTX 4070 12 GB (driver 32.0.21030.2001), 32 GB RAM with a system-managed pagefile, Windows 11. Series X profile, DLSS Performance, frame generation off, ray tracing off. Diagnostics builds, run by
scripts/bench.ps1from the same save each time: the prologue for 130 s after the world's first frame.Base: main
41adb551(v2026.11.29.05) plus #2392, #3474, #3398, #2478, #2591, #2549 and #2305. I took parts out one at a time to find which one crashes:Yesterday a branch on
829188e9that also carried this PR crashed the same way in 3 of the 4 runs that reached the world.In every crash, the lines just before the error are this PR's situation, a card with no room for textures:
A guess from reading the change, not confirmed: a small copy is a texture with fewer levels than its title texture. If a copy or a view still names a level the small copy doesn't have, it would be an invalid command, and
Closefails exactly like this. The D3D12 debug layer isn't installed on this PC, so I couldn't get the exact command.The same error also happens without this PR (#2237, #2276; plain v2026.11.29.01 hit it once in my runs yesterday), but far less often here. This PR makes it near certain on this PC.
🤖 Generated with Claude Code