Skip to content

D3D12.X: track exact command-list write intervals - #3033

Closed
KOLESNiii wants to merge 1 commit into
xcl-dev:mainfrom
KOLESNiii:d3d12x-write-intervals
Closed

KOLESNiii wants to merge 1 commit into
xcl-dev:mainfrom
KOLESNiii:d3d12x-write-intervals

Conversation

@KOLESNiii

Copy link
Copy Markdown
Contributor

First of three stacked PRs for item 3 of #2787 (W1–W5 from #2778, by bmjask): a Wait32/64BitValueX
that depends on a deferred CPU write recorded earlier in the same command list. This part changes no
behaviour. The capped, approximate per-list write ranges become exact intervals in a tree, so later
parts can tell which producer wrote a range and gaps between writes are kept. Part of #2787, #1833.

What is in it

  • 8bdfcd84 D3D12.X: track exact command-list write intervals (hle/d3d12x/list_x.rs). A clean
    cherry-pick -x of 62de4d55, authored by bmjask.

Tested

  • NVIDIA GeForce RTX 2070 SUPER (driver 32.0.16.2140), AMD Ryzen 5 3600XT, Windows 11 build
    26300.9974, Rust 1.100.0, debug for tests, release for smoke.
  • cargo test --workspace -- --test-threads=4 on 8bdfcd84: 1453 passed, 0 failed, 47 ignored.
  • SKIPPED (15, no wave64 on this GPU): the gpu::recomp::lower* / lower_dxil GPU agreement tests,
    dispatch_chain_native_wave64_builds_whole, gpu_geometry_wave32_prefix_count_over_a_mask,
    gpu_wave32_program_in_wave64_hardware, heap_window_out_of_memory_falls_back_to_the_switch_form.

Regression run
Both runs started from copies of the same warm shader cache, with a scripted A press at 25 s (XCL_PRESS_AT=25:A).

xcl-smoke v1
commit: 8b957bec6f82495aec940944c6bf47faa02db590
gpu: NVIDIA GeForce RTX 2070 SUPER
title: retail game
seconds: 60
exit: 0x0
frames shown: 1438 (PresentX 1438)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16292 MB
xcl-smoke v1
commit: 8bdfcd840d0e9f0ed09c5928a6a584848a38b5b9
gpu: NVIDIA GeForce RTX 2070 SUPER
title: retail game
seconds: 60
exit: 0x0
frames shown: 1459 (PresentX 1459)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16452 MB

Not tested

  • AMD and Intel GPUs, and wave64 hardware (the 15 SKIPPED tests).
  • The retail game's 60 s run logged no mid-list split, so it does not reach the code that reads these
    intervals for wait placement.

AI use

  • The code and tests are bmjask's, written with Codex (GPT-5.6-sol). Claude Code (Claude Opus 5.5)
    did the cherry-pick, ran the tests and smoke runs, and drafted this description.

🤖 Generated with Claude Code

Replace capped approximate write ranges with canonical tree-backed intervals. This preserves unwritten gaps without the quadratic insertion cost of an unbounded sorted vector.

Assisted-by: Codex (GPT-5.6-sol)
(cherry picked from commit 62de4d5)
@Aniseto

Aniseto commented Nov 28, 2026

Copy link
Copy Markdown

Ran the command-list write-interval tests at 8bdfcd84 on an NVIDIA Blackwell desktop part:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

XCL_ADAPTER=NVIDIA cargo test -p xcl --lib hle::d3d12x::list_x -- --test-threads=1
47 passed; 0 failed; 0 ignored; 0 measured; 1305 filtered out      (exit 0)

All 47 tests in list_x pass at this head. The PR changes no behavior; it replaces capped approximate write ranges with exact intervals for later stacked work. These are CPU-side tests. The PR has no comments yet, so this is the first datapoint in the thread and the first from an RTX 5070 Ti.

Not tested: the later stacked parts that consume the intervals, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

@JJAutoCompare

Copy link
Copy Markdown

Tested

Exact 8bdfcd840d0e9f0ed09c5928a6a584848a38b5b9 on Windows 11 x64 build 26200.9974, Ryzen 7 3800X, and Rust 1.100.1 MSVC. I reran a pinned standalone test binary after verifying that its RecordedWrites implementation and stock bridging test matched their source ranges byte-for-byte. The original build wrapper returned 1 and did not retain the compiler exit. Both native test exits below were captured independently.

  • interval.exe --exact bitmap_oracle::mixed_writes_match_byte_bitmap --nocapture --test-threads=1 matched a 4,096-byte bitmap oracle across 3,072 inserts, 12,313 overlap queries, six clears, and 3,079 canonical span comparisons. The counters were verified directly from fresh stdout.
  • interval.exe --exact stock::recorded_writes_preserve_gaps_when_bridging_neighbors --nocapture --test-threads=1 passed as the stock control.

2 passed, 0 failed, 0 ignored, 0 runtime skips. Both processes exited 0, with one test filtered out per invocation.

Not tested

Full Cargo build or suite, command-list integration, stacked wait ordering, GPU or device behavior, and retail smoke.

AI use

T3 Code through the Codex harness (gpt-6.2-sol) verified source and executable provenance, reran the tests, and wrote this report.

@KOLESNiii KOLESNiii closed this Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants