8 GB cards: target reserve settles, no black textures from levels on demand, card use past the vkd3d cap #3602
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3602"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ErRusso on 2026-11-30T01:36:20Z.
Three fixes for 8 GB cards, found in logs from an RTX 4060 (8 GB) with 32 GB of RAM under Proton. Not yet play-verified: that PC's normal build crashes with a GPU fault (see below), so a clean run was not possible with or without these changes.
What it changes
1. The render-target reserve is given back once the targets settle.
targets_room_keptsizes the reserve by the targets' peak (targets_kept_from_peak: half as much again as the peak).VICTORY_CARD_ROOM_FOR_TARGETS_MBset, so on the default path the reserve was held for the whole run: 465 to 535 MB in every run on that PC.targets_kept_settled). The reserve comes back when the targets grow by 64 MiB, as with the switch.2. With levels on demand, a full card shows a blurred texture, not a black one.
room()said yes. A texture with no level both held and given reads zeros, so it drew black.VICTORY_LEVELS_ON_DEMAND=autocounted 3,542 uploads that left a held level without memory, and faces and bodies were black.VICTORY_LEVELS_SMALL_TILES(8 tiles, 512 KiB; 0 restores the old rule).victory playkeeps levels on demand off (VICTORY_LEVELS_ON_DEMAND=0), so this matters to theautodefault and to anyone who turns it on.3. Card use at its budget is estimated, because vkd3d-proton never reports it past the budget.
QueryVideoMemoryInfogave "6491 MB in use of a budget of 6491 MB" for two minutes. In the same time the layer's own texture copies grew from 3.1 to 4.3 GB, because every room test compared against the capped figure.Xid 31GPU fault.video_memory()now usesuse_past_the_cap. Within 32 MiB of the budget, use is taken as the last reading under the budget plus what the layer has made on the card since: host textures, alias and tile heaps, card sides of copies, and free texture blocks.How it was tested
cargo xwin test -p victory-gpu --lib, Windows target), with logged numbers pinned in source:without_room_the_smallest_held_levels_still_get_tiles,room_for_targets_by_their_peak_is_given_up_once_they_settle,use_at_the_budget_counts_what_the_layer_made_since.room_for_targets_*,first_upload_*,settled_targets_*andtiles::pass (17 passed, 1 ignored as it needs the card).mainitself fails-D warningson three lints invictory-shader/src/emit/lower{,/analysis}.rs, which this does not touch.Not fixed here: the GPU fault on that PC
That PC's runs end in
Xid 31 ... FAULT_PDE ACCESS_TYPE_VIRT_READat nearly the same GPU address every time (0x5_8d24xxxx), with and without this PR. 13 faults since 2026-11-29, on the unchanged build as well.The same address in every run points to one resource read after it is freed, or before it is bound. That is being looked at separately.
Separately, the NVIDIA driver logs
intermapRegisterDmaMapping: Failed to insert new mapping nodewithgpu_vaspace.cassertion failures. This happens while the card's use is reported at its budget, which fix 3 is meant to prevent. Most of the faults have no such failure before them, though, so the two are not taken to be the same problem. It matches NVIDIA/open-gpu-kernel-modules#1453.🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:50:38Z.
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed