Repository navigation
D3D12.X: the tile-mapping fence is signalled once before the next title work - #3010
voiceovarian1-max wants to merge 1 commit into
Conversation
…le work The `Pages` queue signalled its fence after each tile mapping, and title queues wait for it. Under vkd3d-proton every signal ended a sparse-bind batch: one vkQueueBindSparse per texture, ~0.4 ms each on NVIDIA, with the queues full while a title streamed. Mappings now only mark the fence unsignalled; it is signalled once in `before_execute`, before a title queue's next work. `XCL_PAGE_SIGNAL_EACH=1`: after each mapping, as before. GPU test included. The code is platform-neutral; the cost was measured under Wine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Windows RTX 4090 test of #3010Five 60-second runs on native Windows completed with exit 0, zero logged crashes and zero device removals. The RTX 4090 exercised the deferred fence in the synthetic test. The frame difference changed sign when the order of the two NVIDIA builds was reversed. GPU fence testOn clean PR head With The VRAM module reported 23 passed, 0 failed, 1 ignored, with no explicit $case = 'hle::d3d12x::vram::tests::tile_mappings_are_signalled_once_before_the_next_title_work'
cargo test --locked --release -p xcl --lib $case -- --exact --test-threads=1 --nocapture
$env:XCL_PAGE_SIGNAL_EACH = '1'
cargo test --locked --release -p xcl --lib $case -- --exact --test-threads=1 --nocapture
Remove-Item Env:XCL_PAGE_SIGNAL_EACH
cargo test --locked --release -p xcl --lib hle::d3d12x::vram:: -- --test-threads=1 --nocaptureRegression runRTX 4090 (24 GB), NVIDIA 621.40, Ryzen 7 5800X3D, 32 GB RAM, Windows 11 Pro 26300.10075, Rust 1.99.1 MSVC x64, Windows SDK DXC 1.9.2602.17. Each clean checkout was built with
The title ran for 60 seconds per invocation on the Series X profile. Each invocation received an independently hash-checked copy of the same checkpoint, a fresh XCL shader-cache directory and the same A-button schedule (25, 30, 35 and 40 seconds). The wrapper disabled networking, enabled activity logging and set the timer.
The PR showed 123 more frames than Regression blocks for main and PR, copied from the original script output. AI use. OpenAI Codex (GPT-6) built the revisions, ran the tests and checked the report against the machine-generated logs and manifests. |
|
I tested the two-consumer mapping dependency on RTX 5070 / NVIDIA 616.92 at head In both deferred mode and This covers ordering for synthetic mapped textures and the forced mode, whose existing test returns before GPU setup. It does not measure title behavior, frame time, or performance. AI use: OpenAI Codex with GPT-6.2 Astra built and ran the fixture; Codex reviewed and prepared this report. |
|
Main's AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
For nvidia-dev.
vram::Pagessignalled its fence after each tile mapping (mapandunmap), and title queues wait for that fence inbefore_execute. vkd3d-proton merges consecutive sparse binds into onevkQueueBindSparse, but each signal ends a batch. So a title that streams textures paid one bind per texture, ~0.4 ms each on NVIDIA. In a retail title's world this was 13,000–24,000 sparse ops per 4 s; after the change it was ~700 per 4 s (run on our Linux tree). The frame rate did not rise in that run: the binds still took 2.5–3.1 s of every 4 s, because of the number of tiles (~24,000 a second).Mappings now only mark the fence unsignalled.
before_executesignals it once, before a title queue's next work, then has that queue wait as before. #1747 kept the immediate signal so that tile-mapping operations are fenced before a heap is released. That still holds: pool heaps are only reclaimed inbefore_execute, after this signal, andunmap_marktakes the signalled value.XCL_PAGE_SIGNAL_EACH=1signals after each mapping, as before.What is in it
hle/d3d12x/vram.rs:Pages::unsignalled,mappings_changed, and the signal inbefore_execute. New GPU testtile_mappings_are_signalled_once_before_the_next_title_work: two textures placed on pages, no signal;before_executesignals once; a second call does not signal again.Tested
x86_64-pc-windows-gnu, release. On nvidia-dev3f39671d.cargo test -p xcl --lib -- --test-threads=4), on this commit before the test was added (974d5844): 1691 passed, 8 failed, 28 ignored. nvidia-dev3f39671d: the same 8 failures.67322ca9,cargo test -p xcl --lib vram:: -- --test-threads=1: 23 passed, 0 failed, 1 ignored (churn_update_tile_mappings_timing). With the signal after each mapping forced on, the new test fails (1 failed).Regression run
scripts/smoke.ps1needs Windows, and we only have Linux. A Windows smoke run on nvidia-dev and on this head would be welcome.Not tested
AI use
🤖 Generated with Claude Code