feat: VICTORY_PAGE_WRITES takes its bits as a number (5: host copies under finished reads, no texture slots) #268
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!268
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-268"
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?
@Skyfrye on GitHub · 2026-11-25 22:51 UTC · original
Skyfrye:nep/page-writes-bits→main· +42 −8 · 1 files · 1 commits · merged 2026-11-26 14:21 UTCDraft: the in-game check is pending (the test machine's GPU is in use for a few hours). Everything else below is done.
Change
When a read of the title's (DirectStorage, or a file read) into a plain address finishes, the host copies of buffers that a copy or a pass took while the read was under way keep the bytes from before, until something else marks that memory written.
VICTORY_PAGE_WRITES(watch.rs,page_writes) has a bit for this (4: act on finished reads to plain addresses too), but the only way to set it isall, which also sets bit 2 (texture slots under the write made due again), the bit the code notes "flooded the queue in an earlier form". The default (bit 1) acts on page writes only.In one 5-minute run on an RTX 5080 (Neptune base, launcher settings), 133,144 such reads finished and were only counted ("reads to plain addresses finished (counted only)" on the frame line), while the user saw walls and meshes missing for a while before they appeared, and the texture queue already held 800 to 5,900 textures.
Now any number from 2 to 7 is taken as the bits themselves, and
guards+readsnames5(bits 1 and 4: host copies under page writes and under finished reads are taken again; texture slots left alone). The names (0,1,slots,all, unset) keep their meanings. The default is unchanged.Linked issue: none.
Verification
Windows 11 26300, Rust 1.98.1 (MSVC), RTX 5080, on upstream
mainate921268, fromthird_party/victory:With the numeric forms removed from
page_writes_modeand the test kept, the test fails.Pending: game runs with
VICTORY_PAGE_WRITES=5against the default (diagnostics build with frame captures of the same frames; the frame line's counts of reads finished and blocks opened; frame time), to decide whether 5 should become the launcher's value. I will add the numbers here before marking the PR ready.Oracle and test data
None involved. Failure case:
page_writes_takes_its_names_and_the_bits_as_a_number(every name keeps its value;5,guards+readsand6give their bits;8and an unknown word give the default).Checklist
E_NOTIMPL), never a fake success. (Not concerned.)AI assistance: written with Claude Code (Claude Opus 5.5): the reading of the base, the change, its test, the checks on my machine and this description.
🤖 Generated with Claude Code
@LooperSalty on GitHub · 2026-11-26 00:06 UTC · original
Reviewed: this looks good to merge (tests pass, only the 3 known victory-gpu failures from main). Please mark it ready for review when you are happy with it and we will merge it.
@KainanP on GitHub · 2026-11-26 10:32 UTC · original
Test report for #268 on three adapters.
Merges cleanly onto current main. Setup: current
origin/main(c4c93bd) merged with this PR, Windows 11,cargo test --lockedinthird_party/victory. Adapters: RTX 4060 Laptop (DXGI 0), Intel UHD 8086:a78b (16-lane waves, no FP64), WARP. The hardware adapter is picked by name through a local, uncommitted test hook and confirmed in its log; WARP for victory-gpu is--features diagnostics+VICTORY_D3D12_WARP=1. victory-gpu runs with--test-threads=1.victory-gpu --lib"main's 3" =
descriptor::host::tests::spans_say_the_next_start_and_the_lowest_level_viewed,indirect::tests::warp_card_fetch_copies_flagged_pieces_to_their_slots,indirect::tests::warp_card_patch_writes_the_masked_bytes_and_no_others. They fail on all three adapters on main too.page_writes_testspasses everywhere. No new failure.Notes from reading the diff:
"1"means bits 1+2 (3), while"2".."7"are raw bits. SoVICTORY_PAGE_WRITES=1and=3are the same, and bit 1 alone has no number (only unset/guards). It is easy to trip on. Worth one line in the doc comment, or in the docs table if the switch is listed there.4and6are accepted. Intitle_memory_written, bit 4 only lets finished reads past themode & 4gate. With4alone,open(bit 1) never runs, so whatever4does depends on whatdescriptor::host::page_writtendoes with bit 2 off. If that is nothing,4is a no-op that looks like a setting, and refusing it, or documenting it, would avoid confusion.AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this.