D3D12.X: forward shading rates on shifted command lists #824

Open
github-bot wants to merge 1 commit from github-bot/gh-824 into main AGit
Owner

@⁠Babyhamsta on GitHub · 2026-11-24 06:11 UTC · original
Babyhamsta:fix/shifted-shading-rate → main · +215 −5 · 5 files · 1 commits · open

Forward the newer console command-list slot 126 to the PC shading-rate setter. The title supplies a base rate and two combiners, as documented in the layout investigation. Part of #505.

What is in it

  • Route slot 126 on shifted lists, check host support and restore the rate after an internal list split. Older lists keep their slot 124 route.
  • Add a GPU readback test for both guest layouts and update the graphics support table.

Tested

Windows 11 build 26300.9974, Core i7-13700K, GeForce RTX 4070 (driver 621.35), Rust 1.94.1 MSVC, DXC 1.9.2602.17. Debug workspace tests and release title smokes.

  • cargo build --offline --locked --workspace and cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --nocapture. Final run reported 715 passed, 0 failed, 41 ignored. Two of the 715 returned early for lack of wave64. Optional title-data fixtures had no inputs. An earlier run hit a coherent-buffer VirtualFree assertion that passed on rerun.
  • On tier-2 hardware a pixel shader read SV_ShadingRate as 0 for the default rate and 5 for 2×2 through both slot 124 and slot 126. On the unpatched route the same shifted call yielded 0.
  • The main retail smoke recorded 383 calls to the slot 126 stub. The PR smoke had no slot 126 stub entry. The smoke measures startup. The change in frame count is a single pair of observations.

Regression run

scripts/smoke.ps1 -Game <retail-folder> -Seconds 60, separately built release binaries with fresh 1920×1080 profiles and networking disabled.

xcl-smoke v1
commit: beaa245ca04e212f064efc7cafcdce104bc5c0a2
gpu: NVIDIA GeForce RTX 4070
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 383 (PresentX 383)
presents per 2 s (last 3): 15 16 18
device removals: 0
crashes: 0
peak commit: 15764 MB
xcl-smoke v1
commit: 5c078f554e90fa3b3d8b23b3fc9d57fca26ac454
gpu: NVIDIA GeForce RTX 4070
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 428 (PresentX 428)
presents per 2 s (last 3): 19 19 19
device removals: 0
crashes: 0
peak commit: 15346 MB

Not tested

AMD or tier-1 hardware, a shading-rate image, or a change to the opening story’s appearance or playability.

AI use

OpenAI Codex with GPT-6.2 Sol investigated the call, implemented the routing, and ran the focused and workspace tests. Codex coordinated the review and release smokes.

**@⁠Babyhamsta** on GitHub · 2026-11-24 06:11 UTC · [original](https://github.com/xcl-dev/xcl/pull/824) `Babyhamsta:fix/shifted-shading-rate` → `main` · +215 −5 · 5 files · 1 commits · open Forward the newer console command-list slot 126 to the PC shading-rate setter. The title supplies a base rate and two combiners, as documented in the [layout investigation](https://github.com/ivall/xcl/issues/505#issuecomment-7119616954). Part of #505. **What is in it** - Route slot 126 on shifted lists, check host support and restore the rate after an internal list split. Older lists keep their slot 124 route. - Add a GPU readback test for both guest layouts and update the graphics support table. **Tested** Windows 11 build 26300.9974, Core i7-13700K, GeForce RTX 4070 (driver 621.35), Rust 1.94.1 MSVC, DXC 1.9.2602.17. Debug workspace tests and release title smokes. - `cargo build --offline --locked --workspace` and `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --nocapture`. Final run reported 715 passed, 0 failed, 41 ignored. Two of the 715 returned early for lack of wave64. Optional title-data fixtures had no inputs. An earlier run hit a coherent-buffer `VirtualFree` assertion that passed on rerun. - On tier-2 hardware a pixel shader read `SV_ShadingRate` as 0 for the default rate and 5 for 2×2 through both slot 124 and slot 126. On the unpatched route the same shifted call yielded 0. - The main retail smoke recorded 383 calls to the slot 126 stub. The PR smoke had no slot 126 stub entry. The smoke measures startup. The change in frame count is a single pair of observations. **Regression run** `scripts/smoke.ps1 -Game <retail-folder> -Seconds 60`, separately built release binaries with fresh 1920×1080 profiles and networking disabled. ``` xcl-smoke v1 commit: beaa245ca04e212f064efc7cafcdce104bc5c0a2 gpu: NVIDIA GeForce RTX 4070 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 383 (PresentX 383) presents per 2 s (last 3): 15 16 18 device removals: 0 crashes: 0 peak commit: 15764 MB ``` ``` xcl-smoke v1 commit: 5c078f554e90fa3b3d8b23b3fc9d57fca26ac454 gpu: NVIDIA GeForce RTX 4070 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 428 (PresentX 428) presents per 2 s (last 3): 19 19 19 device removals: 0 crashes: 0 peak commit: 15346 MB ``` **Not tested** AMD or tier-1 hardware, a shading-rate image, or a change to the opening story’s appearance or playability. **AI use** OpenAI Codex with GPT-6.2 Sol investigated the call, implemented the routing, and ran the focused and workspace tests. Codex coordinated the review and release smokes.
Shifted command lists use slot 126 for the per-draw shading rate. Forward validated rates and combiners through the PC command list and restore the state after an internal list split. Preserve the older slot mapping.

Assisted-by: Codex (GPT-6.2 Sol)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:33:46 +00:00
Author
Owner

@⁠mastrr9 on GitHub · 2026-11-24 06:18 UTC · original

Clean-room build, audit, and native hardware test run on NVIDIA RTX 5080 (Windows 11 Pro 25H2 26200.9974, driver 617.42 / 32.0.16.1742, rustc 1.100.0, DXC Windows SDK 10.0.26100.0).

  • Commit tested: 5c078f554e90fa3b3d8b23b3fc9d57fca26ac454
  • Build (cargo build --workspace): clean (only the pre-existing Atomic::<u32>::fetch_update deprecation warning in xgameruntime/mod.rs).
  • Tests (cargo test --workspace -- --test-threads=4): 715 passed; 0 failed; 41 ignored (SKIPPED: only the 2 hardware no wave64 tests).
  • PR-specific tests (all passed on RTX 5080):
    • hle::d3d12x::list_x::vrs_shifted_tests::shifted_vrs_draws_with_requested_rate (VRS tier 2 readback: default=[0,0,0,1], old124=[5,0,0,1], new126=[5,0,0,1], confirming the shifted slot forwards the same 2x2 shading rate)
    • hle::d3d12x::real::shading_rate_slots_cover_both_title_layouts
    • hle::d3d12x::real::queue_tests::queue_slot_18_before_the_layout_is_known_writes_8_bytes
  • Audit: Clean — validates combiner pointer readability, enum bounds, tier / additional-rates / sum-combiner capabilities, handles both adopted and non-adopted lists, and properly serializes global layout-flag mutations in tests via QUEUE_LAYOUT_TEST.

(Clean-room hardware check only; no retail title or smoke.ps1 run. Assisted-by: Antigravity / Claude Sonnet 5.5 + Gemini 4 Neon)

**@⁠mastrr9** on GitHub · 2026-11-24 06:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/824#issuecomment-7123792797) Clean-room build, audit, and native hardware test run on NVIDIA RTX 5080 (Windows 11 Pro 25H2 `26200.9974`, driver `617.42` / `32.0.16.1742`, `rustc 1.100.0`, DXC Windows SDK `10.0.26100.0`). - **Commit tested:** `5c078f554e90fa3b3d8b23b3fc9d57fca26ac454` - **Build (`cargo build --workspace`):** clean (only the pre-existing `Atomic::<u32>::fetch_update` deprecation warning in `xgameruntime/mod.rs`). - **Tests (`cargo test --workspace -- --test-threads=4`):** **`715 passed; 0 failed; 41 ignored`** (`SKIPPED`: only the 2 hardware `no wave64` tests). - **PR-specific tests (all passed on RTX 5080):** - `hle::d3d12x::list_x::vrs_shifted_tests::shifted_vrs_draws_with_requested_rate` (VRS tier 2 readback: `default=[0,0,0,1]`, `old124=[5,0,0,1]`, `new126=[5,0,0,1]`, confirming the shifted slot forwards the same 2x2 shading rate) - `hle::d3d12x::real::shading_rate_slots_cover_both_title_layouts` - `hle::d3d12x::real::queue_tests::queue_slot_18_before_the_layout_is_known_writes_8_bytes` - **Audit:** Clean — validates combiner pointer readability, enum bounds, tier / additional-rates / sum-combiner capabilities, handles both adopted and non-adopted lists, and properly serializes global layout-flag mutations in tests via `QUEUE_LAYOUT_TEST`. *(Clean-room hardware check only; no retail title or `smoke.ps1` run. Assisted-by: Antigravity / Claude Sonnet 5.5 + Gemini 4 Neon)*
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 06:21 UTC · original

Test run of 5c078f554e90fa3b3d8b23b3fc9d57fca26ac454 on AMD RDNA4. I merged it onto current main beaa245 locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, VRS supported), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 715 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 674 passed; 0 SKIPPED.

Review: Routes slot 126 of shifted lists to the PC shading-rate setter; this adapter supports VRS, so the GPU readback test had real hardware under it. Reviewed the structure, not every line.

Not tested: no retail title or regression run (I have no unpacked game), release build.

Run and review by Claude Code (Claude Opus 5.5) on this machine.

**@⁠MesshM** on GitHub · 2026-11-24 06:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/824#issuecomment-7123851894) Test run of `5c078f554e90fa3b3d8b23b3fc9d57fca26ac454` on AMD RDNA4. I merged it onto current `main` `beaa245` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, VRS supported), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **715 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 674 passed; 0 `SKIPPED`. **Review:** Routes slot 126 of shifted lists to the PC shading-rate setter; this adapter supports VRS, so the GPU readback test had real hardware under it. Reviewed the structure, not every line. **Not tested:** no retail title or regression run (I have no unpacked game), release build. Run and review by Claude Code (Claude Opus 5.5) on this machine.
Author
Owner

@⁠dcastell1 on GitHub · 2026-11-24 06:55 UTC · original

Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on main@beaa245:

patch -p1 < this PR            # clean, no fuzz
cargo test --workspace -- --test-threads=4
exit 0

All green: the forwarded shading rates on shifted lists builds and runs, the workspace has no new failure against main on this box (737 passed there), and nothing else changes verdict. Restored the tree afterwards; no game data, hardware adapter, no Wine.

AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.

**@⁠dcastell1** on GitHub · 2026-11-24 06:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/824#issuecomment-7124423437) Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on `main@beaa245`: ``` patch -p1 < this PR # clean, no fuzz cargo test --workspace -- --test-threads=4 exit 0 ``` All green: the forwarded shading rates on shifted lists builds and runs, the workspace has no new failure against `main` on this box (737 passed there), and nothing else changes verdict. Restored the tree afterwards; no game data, hardware adapter, no Wine. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
Author
Owner

@⁠SlopTart on GitHub · 2026-11-24 07:17 UTC · original

Linux / AMD RDNA3 datapoint.

Merged state: head 5c078f5 onto main 1ec4c98, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 707 passed, 10 failed, 41 ignored. Failures are the known Wine-lane set from my #42 rows plus #718 trio members; nothing here fails because of your change. Shifted command list shading-rate forwarding tests green; no new failures.

Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile, --test-threads=4. Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

**@⁠SlopTart** on GitHub · 2026-11-24 07:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/824#issuecomment-7124835933) Linux / AMD RDNA3 datapoint. **Merged state:** head `5c078f5` onto main `1ec4c98`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **707 passed, 10 failed, 41 ignored**. Failures are the known Wine-lane set from my #42 rows plus #718 trio members; nothing here fails because of your change. Shifted command list shading-rate forwarding tests green; no new failures. **Not tested:** retail titles (none here), Windows, RDNA4. Counts only, no game data. **Machine:** RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross `x86_64-pc-windows-gnu`, `XCL_NETWORK=0`, release profile, `--test-threads=4`. Linux rows: #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 10:38 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 10:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/824#issuecomment-7159975853) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/hle/d3d12x/real.rs
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.
git fetch -u origin '+refs/pull/824/head:github-bot/gh-824'
git switch 'github-bot/gh-824'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-824'
git switch 'github-bot/gh-824'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-824'
git switch 'github-bot/gh-824'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-824'
git switch 'main'
git merge --squash 'github-bot/gh-824'
git switch 'main'
git merge --ff-only 'github-bot/gh-824'
git switch 'main'
git merge 'github-bot/gh-824'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.