Repository navigation
Conversation
|
Review (head 6970034, diff read, not a merge-check; draft,
Fine:
#3010 rewrites the same Signal lines, so the two will conflict. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
|
Thanks. Since your review: the smoke block is in (6970034, 2289 frames, clean) and it is out of draft. #3553 is now stacked on this PR (db57f30 on 6970034) without its own copy, so it gets |
Native Windows / NVIDIA verification for #3566Tested PR head Windows 11 24H2 build 26100.9711, Intel Core i9-14900KF, NVIDIA GeForce RTX 4080 SUPER, driver 621.40, Rust 1.100.0 (x86_64-pc-windows-msvc). Workspace tests used the debug profile. Both smokes used release builds. Tested
Commands from the PR worktree: cargo build --workspace
cargo test -p xcl --lib hle::d3d12x::vram::tests::a_failed_signal_leaves_the_value_a_signal_reached -- --exact --nocapture
cargo test -p xcl --lib hle::d3d12x::vram::tests::mappings_whose_signal_failed_get_a_later_mark_before_use -- --exact --nocapture
cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture
cargo bench -p xcl --bench '*' -- --testRegression run Each clean worktree used its own Main (exact parent) PR head Not tested A spontaneous mapping-queue Signal failure on the NVIDIA driver remains unverified. The focused tests injected failures. The smoke pair checks ordinary execution; it does not establish a performance improvement. AI use OpenAI Codex ran the local builds, tests, and smokes, checked the logs, and prepared this report. |
|
#3553 contains this PR's commit (6970034) and is stacked on it; this is the split-out base requested in #3553's review, not a duplicate. #3010 changes the same Signal lines to signal once per title submission, which is a different change. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
|
merge-check AI-written and posted by Foniass without a human check of each point. |
vram's mapping queue raised its value and then signalled it, ignoring the result. When that Signal failed, the value was one no Signal would reach: every queue's next submit waited for it (before_execute) and a retired texture's NULL unmap counted as done although nothing marked it. The value now moves only when the Signal was queued. A mapping or unmapping whose Signal failed is marked, and gets a later Signal before anything counts on it: before_execute queues one and has the title's queue wait for it, and a retired texture stays out of the pool until one completes. When none can be queued either, before_execute says so, and the submission stops with that cause (MappingUnmarked) instead of going out with mappings nothing covers. Tests: a failed Signal leaves the value a Signal reached; with the mapping queue held behind a test fence, a bind, a held unmap released inside before_execute and a retired texture's unmap whose Signals fail each get a later mark, and the work waits for it or does not go. The held-queue test cannot hang the test process: each gate is a guard that Drop opens on unwind, and a detached watchdog opens it after 10 s and fails the test with the phase it was held in. With FAIL_SIGNALS nothing else signals the gates, so an assert between mq.Wait and a gate's Signal, or a test placing on the shared device meanwhile, would otherwise leave the mapping queue waiting for good. reserved_resource_with_private_data_is_excluded_from_recycle takes VRAM_TEST_LOCK, and a test-only lock keeps drain_recycled from marking the test's retired texture while it checks that nothing marked it.
bmjask
left a comment
There was a problem hiding this comment.
Review of 69700342: 2 finding(s). 1 are inline. These are on lines outside the diff:
crates/xcl/src/hle/d3d12x/vram.rs:2866: This is older code, but the same class of bug the PR fixes on the Signal side: reserve_page_wait sets waited[queue] = value before native_queue_wait, and that result is thrown away with let _. If the Wait fails (e.g. E_OUTOFMEMORY), every later before_execute on that queue sees waited >= value and skips the wait, so title work can run before mappings up to N are done.
These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.
| // `map_levels_with_texels`): a copy into a tile still unmapped is a copy-engine page fault | ||
| // on NVIDIA (`DmaPageFaultWrite`). | ||
| super::vram::before_execute(queue); | ||
| if !super::vram::before_execute(queue) { |
There was a problem hiding this comment.
If before_execute fails inside submit_on here, the Err branch (~2919) treats it as an ordinary upload failure and queues a 100 ms retry. refresh_parts still returns Ready, so the title's ExecuteCommandLists go out against level tiles that map_levels_with_texels_in just mapped, with no Signal covering them and no queue Wait on them. That's the case the PR says should end the title with MappingUnmarked.
6970034 to
f5a5743
Compare
|
Test report (not a merge-check: AI-written and posted by Foniass without a human check of each point. |
Publish a consumer wait only once it was queued. Propagate mapping readiness failures out of texture upload preparation, including mappings made after the title queue’s initial wait. Assisted-by: Codex (GPT-6.2 Sol)
|
merge-check AI-written and posted by Foniass without a human check of each point. |
vram's tile-mapping queue raised its value and then signalled it, ignoring the result. When that Signal failed, the value was one no Signal would ever reach: every queue's next submit waited for it (
before_execute), and a retired texture's NULL unmap counted as done although nothing marked it. This makes the value move only when the Signal was queued, and gives every mapping whose Signal failed a later one before anything counts on it. It is split out of #3553 (asked for in its review): it applies on every platform, while #3553 is Wine-on-AMD only.Related: #3553 builds on this (its spares and new placements count on a Signal reaching their mappings). #3010 (draft) changes the same Signal lines to signal once before the next title work; with
signal_nowthat single Signal would get this failure handling too.What is in it (
vram.rs, plus the callers ofbefore_execute)Pages::signal_nowadvancesvalueonly after the Signal was queued and reports a failure;mapandunmap_rangego through it. A mapping or unmapping whose Signal failed leaves the pagesunmarked.Pages::markgives the value that covers every mapping queued so far:value, or a new Signal when one isunmarked.before_executecalls it afterrelease_held_unmaps(which can queue a NULL unmap of its own) and has the title's queue wait for that value.recycle_readyqueues a retired texture with that mark, orUNMARKEDwhen no Signal can be queued;drain_recycledgives such textures a later mark before they can return to the pool.before_executereturns false: the submission is not made and the title stops with that cause (PreparationOutcome::MappingUnmarked: "could not queue a Signal or Wait for texture page mappings"), following the existing fail-closed rule inprepare_title_submission, instead of going out with mappings nothing covers. The GPU content probe returns an error.before_execute, and the title's work waits for it; with no Signal at allbefore_executereturns false; a held unmap that becomes releasable insidebefore_executewith its NULL mapping's Signal failing gets a later mark, and the work waits for it; a retired texture whose unmap's Signal and the retry fail stays out of the pool until a later mark completes. Signal failures are injected through a test-only counter (FAIL_SIGNALS). The same test injects a failed consumer Wait and verifies that the next attempt still waits for the replacement mark.Tested
hle::d3d12x::vram::tests::run on this head under Wine: ok. 71 passed; 0 failed; 1 ignored; 0 measured; 2702 filtered out; finished in 2.58sf5a57437: 2,906 passed, 0 failed, 51 ignored in the four-thread workspace suite. Test reportRegression run
main:
PR:
The PR's kernel log recorded 0 page faults, 0 ring timeouts, 0 ring resets, 0 coredumps, 0 bus losses.
The 180 s standalone RADV run of this head lost the device at about 158 s after three kernel page faults and a gfx ring timeout. The preceding head showed the same failure pattern in two runs. The follow-up above covers startup. The full #3553 stack completed 180 s on the same host without a page fault.
Not tested
AI use
🤖 Generated with Claude Code