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

Open
Babyhamsta wants to merge 1 commit from upstream-pr/824 into main
Babyhamsta commented 2026-11-24 06:11:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Babyhamsta on 2026-11-24T06:11:18Z.


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.

<!-- greyfinch-sync:ivall/xcl:issue:5467097673 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/824). Originally posted by [Babyhamsta](https://github.com/Babyhamsta) on 2026-11-24T06:11:18Z. --- 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.
ethandepstein-del commented 2026-11-24 07:06:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ethandepstein-del on 2026-11-24T06:18:08Z.


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)

<!-- greyfinch-sync:ivall/xcl:comment:7123792797 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/824#issuecomment-7123792797). Originally posted by [ethandepstein-del](https://github.com/ethandepstein-del) on 2026-11-24T06:18:08Z. --- 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)*
MesshM commented 2026-11-24 07:06:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T06:21:37Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7123851894 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/824#issuecomment-7123851894). Originally posted by [MesshM](https://github.com/MesshM) on 2026-11-24T06:21:37Z. --- 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.
dcastell1 commented 2026-11-24 07:06:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by dcastell1 on 2026-11-24T06:55:04Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7124423437 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/824#issuecomment-7124423437). Originally posted by [dcastell1](https://github.com/dcastell1) on 2026-11-24T06:55:04Z. --- 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.
SlopTart commented 2026-11-24 08:03:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T07:17:55Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7124835933 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/824#issuecomment-7124835933). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-24T07:17:55Z. --- 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.
DavidM1911 commented 2026-11-25 11:09:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T10:38:36Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7159975853 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/824#issuecomment-7159975853). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T10:38:36Z. --- 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!
github-actions[bot] commented 2026-11-29 20:41:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:41:04Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7262275695 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/824#issuecomment-7262275695). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T20:41:04Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 04:13:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:13:47Z.


Triage (#1607) – head 5c078f5

#1944 and #3234 (both open) also route the newer command-list layout's #126 (RSSetShadingRate) to the PC method, each differently: #1944 sends console #124 and #126 through one capability-gated handler that sanitizes the rate, #3234 maps #126/#127 straight to PC #77/#78 through the remap table with no VRS check. This PR gates only #126 and is the only one of the three with a GPU readback test of the shifted path. Main still has no (126, 124) entry in NEWER_LIST_SLOTS.
list_x::set_shading_rate_shifted calls CheckFeatureSupport (OPTIONS6, and OPTIONS10 for SUM) on every call; the capabilities could be probed once. The branch conflicts with main, where NEWER_LIST_SLOTS now has 23 entries including (69, 67) and (129, 127).
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7300513399 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/824#issuecomment-7300513399). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:13:47Z. --- **Triage (#1607)** – head 5c078f5 #1944 and #3234 (both open) also route the newer command-list layout's #126 (RSSetShadingRate) to the PC method, each differently: #1944 sends console #124 and #126 through one capability-gated handler that sanitizes the rate, #3234 maps #126/#127 straight to PC #77/#78 through the remap table with no VRS check. This PR gates only #126 and is the only one of the three with a GPU readback test of the shifted path. Main still has no (126, 124) entry in `NEWER_LIST_SLOTS`. `list_x::set_shading_rate_shifted` calls `CheckFeatureSupport` (OPTIONS6, and OPTIONS10 for SUM) on every call; the capabilities could be probed once. The branch conflicts with main, where `NEWER_LIST_SLOTS` now has 23 entries including (69, 67) and (129, 127). Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/824:upstream-pr/824'
git switch 'upstream-pr/824'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/824'
git switch 'upstream-pr/824'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/824'
git switch 'upstream-pr/824'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/824'
git switch 'main'
git merge --squash 'upstream-pr/824'
git switch 'main'
git merge --ff-only 'upstream-pr/824'
git switch 'main'
git merge 'upstream-pr/824'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!818
No description provided.