D3D12.X: remember only accepted private upload waits #3791
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3791"
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 ivall/xcl. Originally posted by Prime1997 on 2026-12-03T14:48:18Z.
A failed wait on the private texture-upload fence could be recorded as satisfied. Later submits could then skip the wait. Record the mark only after valid fence completion or successful queue admission. Failed waits take the existing submission failure path.
What is in it
Tested
989487393161cace0fb2882baf30a25d39d8d506on Windows x64.cargo test --locked -p xcl --lib -- --test-threads=1 --nocapture --exact hle::d3d12x::title_textures::tests::private_upload_wait_keeps_failed_marks_pending_until_a_wait_succeeds. 1 passed, 0 failed, 0 ignored, 0 skips. The regression exercised a failed wait, retry, duplicate suppression, completed fence, and removed-device sentinel.Regression run
Not tested
AI use
Contributors can use this optional temporary Discord to coordinate testing and compare results.
Imported from ivall/xcl. Originally posted by Gevroska on 2026-12-03T17:45:38Z.
@Prime1997 I tested the ordinary submission path on
98948739and its parent (a815de93). With completion at 3, I made the wait for mark 4 fail. The parent remembered 4 as satisfied and returned past the submission gate. The PR kept 3 and took the stop path before reaching the point where driver submission could proceed.I also injected
UINT64_MAXas the completion value. The PR again kept 3 and stopped. The controls behaved as expected: a duplicate after an accepted wait was suppressed, and the same mark on a different queue still required its own wait.I checked 60 observations across six fresh Windows processes. The fixture supplied the D3D12 responses and intercepted the terminal call, so this confirms the wait bookkeeping and submission decision. Actual driver failure and device-removal recovery remain untested.
AI disclosure: OpenAI Codex GPT-6.2 Sol wrote the fixture and ran the comparison. An independent Codex reviewer checked all 60 observations. GPT-6.2 Astra drafted this comment.
I reviewed and approved this comment before posting.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T17:49:23Z.
merge-check
base:
16c2fd082ahead:
9894873931merge: clean
build: ok
tests: 3019 passed, 0 failed, 56 ignored; 28 skipped, the same as on main
review: 4 medium, 3 nits (below)
performance: 60 s smoke run: 1683 → 1665 frames (98 % of main), peak commit 18505 → 17546 MB, no device removal, no crash
title run: retail title on the RTX 5070 Ti (driver 621.14), into the world by scripted presses: 236 s there, 0 device removals, 0 crashes, 3.7 presents/s; run with
XCL_SKIP_CS=95cc13288a27a96e(the NVIDIA hang at the end of loading, #3541) and NVIDIA's 2048 MB shader heap (#2590)verdict: not yet: it is a draft, and
PR descriptionis red; otherwise no blocking finding, the suite passes and the smoke run is cleanhardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5
In short: The PR makes the title queue's Wait on XCL's private texture-upload fence count as done only after the fence has really completed or the Wait was queued. A failed Wait, or the device-removed value (UINT64_MAX), now stops the title through the existing MappingUnmarked path. Before, the mark was saved anyway and later submits skipped the Wait. The logic is correct, the lock order (queue lease, then OWN_WAITED) matches native_queue_wait, and I found no deadlock. Nothing blocks it: what is left is an extra queue-lease acquisition on every submit, untested wiring, and a textual conflict with #3790.
Medium
submit_on(dev, &q, &mut items)next to thewait_for_own_uploads(&q)call that this PR replaces), andgit merge-treereports a conflict between the two heads. The conflict is easy to resolve, but whichever PR merges second needs a rebase and a new test run. #3789 (DirectStorage) does not overlap.Fixes #N/Part of #N). It also cites #2558 as handling the tile-mapping fence, but #2558 is closed and was not merged.Nit
assert!(wait_for_own_uploads(q))would make a wait failure show up directly, instead of only through the later "queue went on" assertion.Checked and fine
a815de932How this was tested
16c2fd08, thencargo build --workspaceandcargo test --workspace --no-fail-fast -- --test-threads=4.scripts/smoke.ps1: 60 s of a retail title on main16c2fd08and on this merge; presents per 2 s at the end: 60 60 60.XCL_RUN_SECONDS=300and scripted A presses counted from the first frame (XCL_PRESS_BASE=frame, #3712) into the world from an existing save; time in the world is counted from the first in-world draw call to the end of the run.Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.