DirectStorage: a destination page number the title has not written yet is read again, not failed at once #855
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!855
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-855"
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?
@PiloteCode on GitHub · 2026-11-25 10:47 UTC · original
PiloteCode:pr/runtime→main· +130 −36 · 10 files · 7 commits · openBased on
9376fd6. It changes one file ofvictory-hle(modules/dstorage.rs) and adds a README line.What was wrong
A request to a destination of physical pages carries an array of page numbers, one per 64 KiB. The title may fill that array after it has enqueued the request. A queue also submits on its own once it is half full, so a worker can take the request before the numbers are there. Until now, an unknown page number failed the request at once. The title never reads a request's result (it only polls for completion), so the model or texture kept whatever its pages held.
Measured at the opening's loading on an RTX 5090: 302 requests of one burst failed this way in one run, and 44 and 9 in two other runs.
What changes (
into_destination)VICTORY_DSTORAGE_RETRIES, 12 tries, about 0.9 s) read the numbers again before each try.destination_waits). The first wait that ends with every number known is logged once, with the tries and microseconds it took. When a request still fails, one warning now says why: a page number is unknown, or the host could not map the pages. It also gives the first page number, the tries, and the totals given up and recovered on a retry. This one warning replaces two.Measured
RTX 5090, the opening's loading and the first minutes after it:
Switches
VICTORY_DSTORAGE_RETRIES=0: as before, no retry of the write. The wait for page numbers has no switch of its own: it only runs where the request would otherwise fail.Tested
RTX 5090, Intel i9-14900KF, Windows 11. The branch was checked as it is, on
9376fd6:cargo test -p victory-hle: 98 + 1 passed, none failed.cargo clippy --workspace --all-targets --locked -- -D warnings, and the same with--all-features: clean. The first commit fixes the three lints that make CI fail on9376fd6; the shader and GPU PRs start with the same commit.cargo build --release -p victory,cargo build --profile diag -p victory --features diagnosticsandcargo xtask policypass.No unit test: the race needs the title's own queue.
Overlaps with open pull requests
#816 (
VICTORY_DSTORAGE_ZERO_FAILED) and #836 (decode intermediates) touch the same file, for other failures.Not tested
Other GPUs, the Series S profile, Linux/Proton.
c36971b2) into the DirectStorage branch: upstream's reads held for the title's Submit, beside the wait for late page numbers fee02394c4@MamaLeVrai on GitHub · 2026-11-25 12:23 UTC · original
Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head
e821cdbintomainf85101bin a throwaway tree (no conflict).cargo clippy --workspace --all-targets --locked -- -D warnings: clean, and the same with--all-features: clean (mainitself fails both on this machine: dead code and a sort invictory-gpu).cargo test --workspace --locked: run 1: 555 passed, 0 failed, 11 ignored; run 2: 555 passed, 0 failed, 11 ignored (mainalone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data.AI-assisted (Claude Code); no game data.
@PiloteCode on GitHub · 2026-11-25 16:23 UTC · original
@MamaLeVrai Thanks for the build and test run on an RX 6950 XT. It confirms that the branch merges into
f85101bwithout a conflict, passes clippy with and without--all-features, and keepsmain's test count (555 passed, 11 ignored).The clippy failures you saw on
mainalone are the ones this PR's first commit fixes (19d40a7), all invictory-gpu:unnecessary_sort_byindraw.rs;depth_written, never read, inindirect.rs;placed_filler_twins, unused without thediagnosticsfeature.#854 starts with the same commit.
For the effect in the title: on our RTX 5090 test machine, 302, 44 and 9 requests failed in three runs of the opening's loading before the change, and none after. If you run the title with it, any build logs:
A diagnostics build with
VICTORY_LOG=victory_hle::modules::dstorage=debug,infoalso counts the requests that waited, every 5 s (destination_waits).@PiloteCode on GitHub · 2026-11-25 22:11 UTC · original
Merged
main(c36971b) into the branch: a merge commit on top of the commits already here (fee0239), then three small commits. The branch merges intomainwithout a conflict again.The conflict. One, in
dstorage.rs: each side had added a static afterinto_destination(DESTINATION_WAITShere,AUTO_SUBMITSonmain). Both are kept.What
main's79cfdd9changes for this PR. A queue that submits itself half full now leaves its reads into physical pages for the title's Submit. That closes the path this PR was written for. It also covers a list that still names a page's previous owner, which this PR never did: it only waits for a number that is not known. What this PR still adds on top of the hold:queue).The numbers in the description (302, 44 and 9 failed requests before, none after) were measured before
79cfdd9. What this PR changes in the title on top of the hold has not been measured: the merged branch has not run in the title.Added after the merge:
main's newer code, the same as on our other open branches:manual_is_multiple_ofinshadow.rs,queue.rs,draw.rsandwatch.rs,map_entryinfpsbox.rs,collapsible_ifinpipeline/library.rs. Without themcargo clippy --workspace --all-targets --locked -- -D warningsfails onc36971b, with or without--all-features.into_destinationand the README line up to date (they said a half-full queue's own submission brought a worker to the request first), and adds a test,a_page_number_written_after_its_read_started_is_read_again: a read is submitted with no page number in its list, the number is written 20 ms later, the request succeeds and the page holds its bytes. The test passes onmainalone too (c36971bwith only the test added): there the retries of the write read the list's memory again. So it holds the behaviour, and does not tell this branch frommain. No change of behaviour in this commit.Checked, the branch as it is (
f0c8068), every test on the software adapter:cargo clippy --workspace --all-targets --locked -- -D warnings, and the same with--all-features: clean.cargo xtask policy,cargo build --release -p victoryandcargo build --profile diag -p victory --features diagnostics: pass.cargo test -p victory-hle -- --test-threads=1: 101 + 1 passed (main: 100 + 1; the one more is the new test).cargo test -p victory-gpu --features diagnostics -- --test-threads=1withVICTORY_D3D12_WARP=1: 200 passed, 1 failed, 6 ignored, as onmain. The failure isdepth_bounds_pipeline_loads_and_filters_draws: WARP does not reject the pixels outside the depth bounds.cargo test -p victory-shader -- --test-threads=1withVICTORY_WARP=1: 212 passed, 4 failed, 3 ignored, the same four as onmainon the software adapter.cargo test -p victory -p victory-loader: passed.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.