D3D12.X: forward RSSetShadingRate to ID3D12GraphicsCommandList5 #1934

Open
fixgep wants to merge 1 commit from upstream-pr/1944 into main
fixgep commented 2026-11-24 23:46:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fixgep on 2026-11-24T23:46:27Z.


The console command list's RSSetShadingRate sits at #124 on the base console layout and at #126 on the newer layout. main already remapped the base slot straight to the PC's ID3D12GraphicsCommandList5::RSSetShadingRate (PC #77), while the newer slot #126 was unrouted and fell into the console-extension stub (ID3D12GraphicsCommandList10::#126 (not on PC)). Both slots now route through a single capability-gated handler. Part of #505.

What is in it

  • crates/xcl/src/hle/d3d12x/device_x.rs: probe and cache D3D12_FEATURE_DATA_D3D12_OPTIONS6 (VariableShadingRateTier, AdditionalShadingRatesSupported) on the underlying PC ID3D12Device at creation and log it once (probe_vrs, vrs).
  • crates/xcl/src/hle/d3d12x/list_x.rs: add rs_set_shading_rate_x — clean no-op without host VRS; otherwise sanitize the base rate (clamp unsupported axes to 2X/4X per AdditionalShadingRatesSupported) and combiners (unknown combiners -> PASSTHROUGH, unreadable combiners pointer -> NULL defaults) before forwarding to ID3D12GraphicsCommandList5::RSSetShadingRate, and record/re-apply the state across KickoffX and mid-list splits (restore_bindings).
  • crates/xcl/src/hle/d3d12x/real.rs: route console #124 through rs_set_shading_rate_x instead of the bare PC remap and map newer-layout #126 to #124 in NEWER_LIST_SLOTS (title_list wrappers inherit this through the extended vtable).
  • Tests (device_x.rs / list_x.rs / real.rs): slot-routing table assertions, rate/combiner sanitization unit tests, null-list no-op test, and an isolated child-process D3D12 debug-layer forwarding test.

Tested

  • NVIDIA GeForce RTX 3060 (driver 32.0.15.9144), AMD Ryzen 5 7500F 6-Core Processor, Windows 11 Pro x64 (build 26200), rustc 1.100.0 (0ef1bc386 2026-11-09); debug and release
  • Rebased onto upstream/main (6bfb5c51) as c27fd113:
    • cargo build -j 4 --workspace, cargo test -j 4 --workspace --no-run, and cargo build -j 4 --release -p xcl: all exited 0 with 0 new compiler warnings.
    • RTX 3060: cargo test -p xcl --lib shading_rate -- --test-threads=1 (6 passed, 0 failed, 0 ignored, 0 SKIPPED); cargo test -p xcl --lib hle::d3d12x::list_x::tests -- --test-threads=1 (109 passed, 0 failed, 0 ignored, 0 SKIPPED).
    • WARP (XCL_ADAPTER=warp): cargo test -p xcl --lib shading_rate -- --test-threads=1 (6 passed, 0 failed, 0 ignored, 0 SKIPPED); cargo test -p xcl --lib hle::d3d12x::list_x::tests -- --test-threads=1 (109 passed, 0 failed, 0 ignored, 0 SKIPPED).
    • Newer-layout retail title (title: 3c290c16, 60 s release scripts/smoke.ps1, XCL_PREPARE=0): main (6bfb5c51) logged [STUB] d3d12_xs.dll!ID3D12GraphicsCommandList10::#126 (not on PC) (1671 frames); c27fd113 logged D3D12.X: variable shading rate (OPTIONS6): tier 2, additional rates true, cleared the #126 stub warning, and reached 1672 frames with 0 crashes / 0 device removals.

Regression run
main:

xcl-smoke v1
commit: 6bfb5c5153ccc23517daf30aa1071ddb0fadb53c
gpu: NVIDIA GeForce RTX 3060
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1671 (PresentX 1671)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15182 MB

PR:

xcl-smoke v1
commit: c27fd113cd29aff672cc6f7febe43587bd15809b
gpu: NVIDIA GeForce RTX 3060
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1672 (PresentX 1672)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14945 MB

Not tested

  • Rasterization output (SV_ShadingRate readback draw) from the forwarded shading rate
  • Tier 1 VRS hardware and adapters without VRS (the no-op path is covered by unit logic only); AMD / Intel GPUs
  • Newer-layout #126 identity on other titles: #1049 decodes #126 as a stencil-ref setter on another runtime; while a title passes zeroed arguments this sanitized forward acts as default rate/combiners (flagged for review)
  • RSSetShadingRateImage (console #125 / newer #127) is out of scope

AI use

  • ZCode (GLM-5.4): wrote the implementation and unit/GPU tests in 30862ad and ran the initial xcl-smoke runs.
  • Antigravity (Gemini 4 Hydrogen): verified the initial workspace test suite, reviewed the diff and retail title run logs, and validated the initial PR description.
  • Antigravity (Gemini 4 Neon): rebased onto upstream/main (6bfb5c51), resolved merge conflicts in list_x.rs and real.rs, verified debug/release builds, targeted RTX 3060 and WARP unit tests, paired 60 s xcl-smoke runs, and scripts/pr_check.py validation.
<!-- greyfinch-sync:ivall/xcl:issue:5482298844 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1944). Originally posted by [fixgep](https://github.com/fixgep) on 2026-11-24T23:46:27Z. --- The console command list's `RSSetShadingRate` sits at `#124` on the base console layout and at `#126` on the newer layout. `main` already remapped the base slot straight to the PC's `ID3D12GraphicsCommandList5::RSSetShadingRate` (PC `#77`), while the newer slot `#126` was unrouted and fell into the console-extension stub (`ID3D12GraphicsCommandList10::#126 (not on PC)`). Both slots now route through a single capability-gated handler. Part of #505. **What is in it** - `crates/xcl/src/hle/d3d12x/device_x.rs`: probe and cache `D3D12_FEATURE_DATA_D3D12_OPTIONS6` (`VariableShadingRateTier`, `AdditionalShadingRatesSupported`) on the underlying PC `ID3D12Device` at creation and log it once (`probe_vrs`, `vrs`). - `crates/xcl/src/hle/d3d12x/list_x.rs`: add `rs_set_shading_rate_x` — clean no-op without host VRS; otherwise sanitize the base rate (clamp unsupported axes to 2X/4X per `AdditionalShadingRatesSupported`) and combiners (unknown combiners -> `PASSTHROUGH`, unreadable `combiners` pointer -> `NULL` defaults) before forwarding to `ID3D12GraphicsCommandList5::RSSetShadingRate`, and record/re-apply the state across `KickoffX` and mid-list splits (`restore_bindings`). - `crates/xcl/src/hle/d3d12x/real.rs`: route console `#124` through `rs_set_shading_rate_x` instead of the bare PC remap and map newer-layout `#126` to `#124` in `NEWER_LIST_SLOTS` (`title_list` wrappers inherit this through the extended vtable). - Tests (`device_x.rs` / `list_x.rs` / `real.rs`): slot-routing table assertions, rate/combiner sanitization unit tests, null-list no-op test, and an isolated child-process D3D12 debug-layer forwarding test. **Tested** - NVIDIA GeForce RTX 3060 (driver `32.0.15.9144`), AMD Ryzen 5 7500F 6-Core Processor, Windows 11 Pro x64 (build 26200), `rustc 1.100.0 (0ef1bc386 2026-11-09)`; debug and release - Rebased onto `upstream/main` (`6bfb5c51`) as `c27fd113`: - `cargo build -j 4 --workspace`, `cargo test -j 4 --workspace --no-run`, and `cargo build -j 4 --release -p xcl`: all exited 0 with 0 new compiler warnings. - RTX 3060: `cargo test -p xcl --lib shading_rate -- --test-threads=1` (`6 passed, 0 failed, 0 ignored, 0 SKIPPED`); `cargo test -p xcl --lib hle::d3d12x::list_x::tests -- --test-threads=1` (`109 passed, 0 failed, 0 ignored, 0 SKIPPED`). - WARP (`XCL_ADAPTER=warp`): `cargo test -p xcl --lib shading_rate -- --test-threads=1` (`6 passed, 0 failed, 0 ignored, 0 SKIPPED`); `cargo test -p xcl --lib hle::d3d12x::list_x::tests -- --test-threads=1` (`109 passed, 0 failed, 0 ignored, 0 SKIPPED`). - Newer-layout retail title (`title: 3c290c16`, 60 s release `scripts/smoke.ps1`, `XCL_PREPARE=0`): `main` (`6bfb5c51`) logged `[STUB] d3d12_xs.dll!ID3D12GraphicsCommandList10::#126 (not on PC)` (`1671` frames); `c27fd113` logged `D3D12.X: variable shading rate (OPTIONS6): tier 2, additional rates true`, cleared the `#126` stub warning, and reached `1672` frames with 0 crashes / 0 device removals. **Regression run** main: ``` xcl-smoke v1 commit: 6bfb5c5153ccc23517daf30aa1071ddb0fadb53c gpu: NVIDIA GeForce RTX 3060 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1671 (PresentX 1671) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15182 MB ``` PR: ``` xcl-smoke v1 commit: c27fd113cd29aff672cc6f7febe43587bd15809b gpu: NVIDIA GeForce RTX 3060 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1672 (PresentX 1672) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14945 MB ``` **Not tested** - Rasterization output (`SV_ShadingRate` readback draw) from the forwarded shading rate - Tier 1 VRS hardware and adapters without VRS (the no-op path is covered by unit logic only); AMD / Intel GPUs - Newer-layout `#126` identity on other titles: #1049 decodes `#126` as a stencil-ref setter on another runtime; while a title passes zeroed arguments this sanitized forward acts as default rate/combiners (flagged for review) - `RSSetShadingRateImage` (console `#125` / newer `#127`) is out of scope **AI use** - ZCode (`GLM-5.4`): wrote the implementation and unit/GPU tests in `30862ad` and ran the initial `xcl-smoke` runs. - Antigravity (`Gemini 4 Hydrogen`): verified the initial workspace test suite, reviewed the diff and retail title run logs, and validated the initial PR description. - Antigravity (`Gemini 4 Neon`): rebased onto `upstream/main` (`6bfb5c51`), resolved merge conflicts in `list_x.rs` and `real.rs`, verified debug/release builds, targeted RTX 3060 and WARP unit tests, paired 60 s `xcl-smoke` runs, and `scripts/pr_check.py` validation.
futurepro62 commented 2026-11-25 00:09:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T23:56:55Z.


Full-suite run, since this PR has no test report yet. Tested exact head 30862ad (on its base 689f2db).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::dxil::fuzz_tests: 970 passed, 0 failed, 43 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • The new tests ran and passed: sanitize_shading_rate_clamps_to_what_the_adapter_supports, rs_set_shading_rate_x_without_a_list_is_a_no_op, rs_set_shading_rate_x_forwards_without_debug_layer_errors, rs_set_shading_rate_x_debug_layer_child, shading_rate_slots_run_the_handler.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 979 passed, 0 failed, 45 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main 62265d3 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651) and the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7147970439 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1944#issuecomment-7147970439). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T23:56:55Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `30862ad` (on its base `689f2db`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::dxil::fuzz_tests`: **970 passed, 0 failed, 43 ignored**. SKIPPED (no wave64): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - The new tests ran and passed: `sanitize_shading_rate_clamps_to_what_the_adapter_supports`, `rs_set_shading_rate_x_without_a_list_is_a_no_op`, `rs_set_shading_rate_x_forwards_without_debug_layer_errors`, `rs_set_shading_rate_x_debug_layer_child`, `shading_rate_slots_run_the_handler`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **979 passed, 0 failed, 45 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `--skip` leaves out tests that fail on main `62265d3` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651) and the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests ([follow-up on #1651](https://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
raylitebull commented 2026-11-25 02:09:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T01:54:21Z.


Code review on 30862ad:

  • Probing D3D12_FEATURE_DATA_D3D12_OPTIONS6 (device_x::probe_vrs / vrs()), routing console RSSetShadingRate (#124 and NEWER_LIST_SLOTS #126) through list_x::rs_set_shading_rate_x, clamping unsupported axes via sanitize_shading_rate, preserving shading rate across restore_bindings, and subprocess-testing debug-layer safety (rs_set_shading_rate_x_forwards_without_debug_layer_errors) is very thorough.
  • Diff audited and CI workflow approved (running).

Remaining before merge: Build and test finishing green plus AMD verification on 30862ad.

<!-- greyfinch-sync:ivall/xcl:comment:7150095617 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1944#issuecomment-7150095617). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T01:54:21Z. --- Code review on `30862ad`: - Probing `D3D12_FEATURE_DATA_D3D12_OPTIONS6` (`device_x::probe_vrs` / `vrs()`), routing console `RSSetShadingRate` (`#124` and `NEWER_LIST_SLOTS` `#126`) through `list_x::rs_set_shading_rate_x`, clamping unsupported axes via `sanitize_shading_rate`, preserving shading rate across `restore_bindings`, and subprocess-testing debug-layer safety (`rs_set_shading_rate_x_forwards_without_debug_layer_errors`) is very thorough. - Diff audited and `CI` workflow approved (running). **Remaining before merge:** `Build and test` finishing green plus **AMD** verification on `30862ad`.
Royalflamejlh commented 2026-11-25 03:05:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-25T02:09:19Z.


Linux (Wine + vkd3d-proton) + NVIDIA test of 30862ad on its base 689f2db with #684 merged in: in 100 s of a retail title the #126 stub was called 0 times with it (2 of 2 runs) and 1,446 to 1,662 times without (3 runs), and the screens were the same. One run on native Windows also made 0 calls of the stub.

Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b, RTX 4070 12 GB (driver 615.71.09), Ryzen 9 9950X3D, 62 GB RAM; release, cross-compiled to x86_64-pc-windows-gnu (rustc 1.98.0), XCL_PSO_PRELOAD=0. Windows: Windows 11 Pro 26300, RTX 5070 Ti 16 GB (driver 621.24), Ryzen 7 9800X3D, 32 GB RAM, rustc 1.99.1, release. Retail title 1.0.2.1, the first-run screens completed once and no story progress, A pressed on the account screen.

Tested

100 s on Linux without (3 runs) with 30862ad (2 runs)
ID3D12GraphicsCommandList10::#126 (not on PC) stub calls 1474, 1446, 1662 0, 0
variable shading rate (OPTIONS6) line – tier 2, additional rates true
frames 1465, 1428, 1617 1736, 1391
last 2 s with a present 82.6, 84.1, 96.1 s 98.3, 82.1 s
faults, device removals, NVIDIA kernel messages 0 0
  • The third run without it started beside another job on the machine and pressed A twice; the stub count is the comparison, not the frames.
  • Kept frames of one run of each tree show the same screens (intro film, logo, both loading pictures).
  • Windows, 1 run of 120 s with it: 0 calls of the stub, the same OPTIONS6 line, no fault. A run of 689f2db alone 2 h 45 min earlier logged 1,262 calls; it is not a pair.
  • Of the five shading_rate tests, the three without a device passed under Wine; the debug-layer pair passed by skipping (SKIPPED … no InfoQueue), so no test checked the forward here.

Read

  • list_x.rs:537 (sanitize_shading_rate): each axis is clamped by itself, so 0x2 and 0x8 (1x4 and 4x1) pass unchanged with the additional rates, and D3D12_SHADING_RATE has no such value. Does the console accept those two, and what does the PC do with them?

Not tested: that each call reaches the PC's RSSetShadingRate (the handler logs nothing per call); a 3D scene; which rate and combiners the title passes; an adapter without variable-rate shading; a matched pair on Windows; AMD and Intel.

AI use: Claude Code (Claude Fable 5.2) read the diff, built the trees, ran the title and the tests, compared the frames and wrote this comment.

Posted without review by a person: the account owner was away and reads replies later.

<!-- greyfinch-sync:ivall/xcl:comment:7150381304 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1944#issuecomment-7150381304). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-11-25T02:09:19Z. --- Linux (Wine + vkd3d-proton) + NVIDIA test of `30862ad` on its base `689f2db` with #684 merged in: in 100 s of a retail title the `#126` stub was called 0 times with it (2 of 2 runs) and 1,446 to 1,662 times without (3 runs), and the screens were the same. One run on native Windows also made 0 calls of the stub. **Setup:** Fedora 44 (kernel 7.2.9), Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b, RTX 4070 12 GB (driver 615.71.09), Ryzen 9 9950X3D, 62 GB RAM; release, cross-compiled to `x86_64-pc-windows-gnu` (rustc 1.98.0), `XCL_PSO_PRELOAD=0`. Windows: Windows 11 Pro 26300, RTX 5070 Ti 16 GB (driver 621.24), Ryzen 7 9800X3D, 32 GB RAM, rustc 1.99.1, release. Retail title 1.0.2.1, the first-run screens completed once and no story progress, A pressed on the account screen. **Tested** | 100 s on Linux | without (3 runs) | with `30862ad` (2 runs) | |---|---|---| | `ID3D12GraphicsCommandList10::#126 (not on PC)` stub calls | 1474, 1446, 1662 | 0, 0 | | `variable shading rate (OPTIONS6)` line | – | `tier 2, additional rates true` | | frames | 1465, 1428, 1617 | 1736, 1391 | | last 2 s with a present | 82.6, 84.1, 96.1 s | 98.3, 82.1 s | | faults, device removals, NVIDIA kernel messages | 0 | 0 | - The third run without it started beside another job on the machine and pressed A twice; the stub count is the comparison, not the frames. - Kept frames of one run of each tree show the same screens (intro film, logo, both loading pictures). - Windows, 1 run of 120 s with it: 0 calls of the stub, the same OPTIONS6 line, no fault. A run of `689f2db` alone 2 h 45 min earlier logged 1,262 calls; it is not a pair. - Of the five `shading_rate` tests, the three without a device passed under Wine; the debug-layer pair passed by skipping (`SKIPPED … no InfoQueue`), so no test checked the forward here. **Read** - `list_x.rs:537` (`sanitize_shading_rate`): each axis is clamped by itself, so `0x2` and `0x8` (1x4 and 4x1) pass unchanged with the additional rates, and `D3D12_SHADING_RATE` has no such value. Does the console accept those two, and what does the PC do with them? **Not tested:** that each call reaches the PC's `RSSetShadingRate` (the handler logs nothing per call); a 3D scene; which rate and combiners the title passes; an adapter without variable-rate shading; a matched pair on Windows; AMD and Intel. **AI use:** Claude Code (Claude Fable 5.2) read the diff, built the trees, ran the title and the tests, compared the frames and wrote this comment. Posted without review by a person: the account owner was away and reads replies later.
DavidM1911 commented 2026-11-25 03:05:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T02:50:29Z.


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:7151255576 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1944#issuecomment-7151255576). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T02:50:29Z. --- 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!
JJAutoCompare commented 2026-11-25 03:05:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T02:55:02Z.


PR #1944 compatibility verification

Commit 30862ad39c530455cd7c7072213b0a522d425b55

Tested

  • STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, DoublePrecisionFloatShaderOps=0, wave size 8–32). Rust 1.100.0 (0ef1bc386 2026-11-09), DXC/DXIL 1.9.2609.5, debug/test profiles with debug info disabled, XCL_ADAPTER=A770. The D3D12 debug-layer DLL is absent.
  • cargo build --workspace and cargo test --workspace --no-run succeeded.
  • cargo test -p xcl shading_rate -- --nocapture reported 5 passed, 0 failed, 0 ignored. The checks cover rate and combiner sanitization, a null command list, and wiring for console slots 124/126. The forwarding wrapper's short --exact filter matched 0 tests, and the child returns immediately in an ordinary run.
  • Reran the child by its fully qualified name with XCL_SHADING_RATE_DEBUG_CHILD=1 under the Arc lock. It emitted SKIPPED … no InfoQueue and returned before recording any shading-rate command. This skip is outside the workspace totals. Workspace logs confirmed the OPTIONS6 probe reported VRS tier 2 with additional rates.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once under the shared Arc lock. Across 20 result blocks, libtest reported 955 passed, 25 failed, 45 ignored. The log contains 22 SKIPPED lines. Those lines include skipped subcases and do not count as coverage.
  • Failures comprised 20 GPU compute pipeline creation errors (0x80070057), four shader result mismatches (FMA, mip sampling, packed FP16, wave reduction), and one synthetic-title failure in dynamic depth bias (RSSetDepthBiasX).
  • Skip lines comprised 17 for unavailable wave64, three for refused per-lane DXIL forms, one for unavailable driver-cache control, and one for unavailable heap windows.

Not tested

Live CL5 shading-rate forwarding and restoration after command-list splits, the VRS-unsupported path on hardware, and other adapters. No retail-title smoke run or main baseline was run, so the suite failures cannot be attributed to this PR from these results.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1944-suite.log and published this report.

<!-- greyfinch-sync:ivall/xcl:comment:7151355260 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1944#issuecomment-7151355260). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T02:55:02Z. --- # PR #1944 compatibility verification **Commit** `30862ad39c530455cd7c7072213b0a522d425b55` **Tested** - STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, `DoublePrecisionFloatShaderOps=0`, wave size 8–32). Rust `1.100.0 (0ef1bc386 2026-11-09)`, DXC/DXIL `1.9.2609.5`, debug/test profiles with debug info disabled, `XCL_ADAPTER=A770`. The D3D12 debug-layer DLL is absent. - `cargo build --workspace` and `cargo test --workspace --no-run` succeeded. - `cargo test -p xcl shading_rate -- --nocapture` reported **5 passed, 0 failed, 0 ignored**. The checks cover rate and combiner sanitization, a null command list, and wiring for console slots 124/126. The forwarding wrapper's short `--exact` filter matched **0 tests**, and the child returns immediately in an ordinary run. - Reran the child by its fully qualified name with `XCL_SHADING_RATE_DEBUG_CHILD=1` under the Arc lock. It emitted `SKIPPED … no InfoQueue` and returned before recording any shading-rate command. This skip is outside the workspace totals. Workspace logs confirmed the OPTIONS6 probe reported VRS tier 2 with additional rates. - `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once under the shared Arc lock. Across 20 result blocks, libtest reported **955 passed, 25 failed, 45 ignored**. The log contains **22 `SKIPPED` lines**. Those lines include skipped subcases and do not count as coverage. - Failures comprised 20 GPU compute pipeline creation errors (`0x80070057`), four shader result mismatches (FMA, mip sampling, packed FP16, wave reduction), and one synthetic-title failure in dynamic depth bias (`RSSetDepthBiasX`). - Skip lines comprised 17 for unavailable wave64, three for refused per-lane DXIL forms, one for unavailable driver-cache control, and one for unavailable heap windows. **Not tested** Live CL5 shading-rate forwarding and restoration after command-list splits, the VRS-unsupported path on hardware, and other adapters. No retail-title smoke run or `main` baseline was run, so the suite failures cannot be attributed to this PR from these results. **AI use** T3 Code / Codex (`gpt-6.2-sol`, `reasoningEffort: high`) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, `gemini-4-neon`) verified counts against `pr1944-suite.log` and published this report.
Foniass commented 2026-12-01 07:08:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:08:41Z.


Triage (#1607) – head 30862ad

#824 and #3234 also make the newer layout's command-list slot #126 reach the PC's RSSetShadingRate, each in a different way:

  • #3234 only adds the slot remaps (126,124) and (127,125) to PC #77 / #78.
  • #824 adds a validating handler for #126 only.
  • This PR sends both #124 and #126 through rs_set_shading_rate_x. The handler does nothing when the host has no VRS (OPTIONS6), clamps the rate and combiners, and the rate is reapplied in restore_bindings.
    Main still maps #124 straight to PC #77 and has no #126 entry. No problems found in the diff. Maintainers should keep one of the three.
    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:7303696512 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1944#issuecomment-7303696512). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:08:41Z. --- **Triage (#1607)** – head 30862ad #824 and #3234 also make the newer layout's command-list slot #126 reach the PC's RSSetShadingRate, each in a different way: - #3234 only adds the slot remaps `(126,124)` and `(127,125)` to PC #77 / #78. - #824 adds a validating handler for #126 only. - This PR sends both #124 and #126 through `rs_set_shading_rate_x`. The handler does nothing when the host has no VRS (OPTIONS6), clamps the rate and combiners, and the rate is reapplied in `restore_bindings`. Main still maps #124 straight to PC #77 and has no #126 entry. No problems found in the diff. Maintainers should keep one of the three. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
fixgep commented 2026-12-01 17:06:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fixgep on 2026-12-01T17:06:22Z.


@Foniass Rebased onto latest upstream/main (6bfb5c51 -> c27fd113) and resolved the merge conflicts in list_x.rs and real.rs, keeping both #124 and newer #126 routed through rs_set_shading_rate_x alongside OPTIONS6 gating, clamping, and restore_bindings reapplication. Re-verified builds, shading-rate / list_x unit tests on RTX 3060 and WARP, and paired 60 s release smoke runs in the updated PR description.

<!-- greyfinch-sync:ivall/xcl:comment:7318761551 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1944#issuecomment-7318761551). Originally posted by [fixgep](https://github.com/fixgep) on 2026-12-01T17:06:22Z. --- @Foniass Rebased onto latest `upstream/main` (`6bfb5c51` -> `c27fd113`) and resolved the merge conflicts in `list_x.rs` and `real.rs`, keeping both `#124` and newer `#126` routed through `rs_set_shading_rate_x` alongside `OPTIONS6` gating, clamping, and `restore_bindings` reapplication. Re-verified builds, shading-rate / `list_x` unit tests on RTX 3060 and WARP, and paired 60 s release smoke runs in the updated PR description.
Foniass commented 2026-12-01 20:59:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T20:59:12Z.


Follow-up review (head c27fd113, since 30862ad, diff read, not a merge-check):

  • Triage (keep open; #824, #3234 and this PR each route the newer layout's #126 to the PC's RSSetShadingRate; maintainers should keep one): still open. Since 30862ad this is a rebase onto main 6bfb5c51 with the same change; #824 and #3234 are both still open, and main still remaps #124 straight to PC #77 with no #126 entry. #3234 conflicts with this PR on the NEWER_LIST_SLOTS line.

New: none.

Fine: both slots run one handler, which does nothing without OPTIONS6 VRS, clamps each axis to the adapter's cap, turns unknown combiners into PASSTHROUGH, and reaches ID3D12GraphicsCommandList5 through cast like the CL9 depth-bias path (list_x.rs ~1865); the state is kept in Bindings, cleared on Reset and restored after KickoffX and mid-list splits; shading_rate_slots_run_the_handler fails on main. The #126 entry works because #124 moves into console_slots (real.rs ~1666), which the newer-slot loop looks up (~1461-1465).

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7325571026 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1944#issuecomment-7325571026). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T20:59:12Z. --- Follow-up review (head c27fd113, since 30862ad, diff read, not a merge-check): - **Triage (keep open; #824, #3234 and this PR each route the newer layout's #126 to the PC's `RSSetShadingRate`; maintainers should keep one):** still open. Since `30862ad` this is a rebase onto main `6bfb5c51` with the same change; #824 and #3234 are both still open, and main still remaps #124 straight to PC #77 with no #126 entry. #3234 conflicts with this PR on the `NEWER_LIST_SLOTS` line. New: none. Fine: both slots run one handler, which does nothing without OPTIONS6 VRS, clamps each axis to the adapter's cap, turns unknown combiners into `PASSTHROUGH`, and reaches `ID3D12GraphicsCommandList5` through `cast` like the CL9 depth-bias path (`list_x.rs` ~1865); the state is kept in `Bindings`, cleared on Reset and restored after `KickoffX` and mid-list splits; `shading_rate_slots_run_the_handler` fails on main. The #126 entry works because #124 moves into `console_slots` (`real.rs` ~1666), which the newer-slot loop looks up (~1461-1465). AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
vasanex commented 2026-12-02 04:08:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vasanex on 2026-12-02T04:08:26Z.


merge-check
base: 1c8b551475
head: c27fd113cd
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2914 passed, 0 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 cannot disable the driver cache), the same tests as on the base (2909 passed there); failing: none. The five new tests ran, the debug-layer child included (this adapter reports VRS tier 2 with additional rates, so the forwarding path was the one tested, not the no-op).
review: whole diff read, nothing that blocks. The recorded rate is part of Bindings, which every reset path replaces whole, so no rate leaks into the next recording; restore_bindings re-applies it after KickoffX. One small gap: sanitize_shading_rate clamps each axis on its own, so 4x1 (0x8) and 1x4 (0x2) pass through although they are not D3D12_SHADING_RATE values (the PC has 1x1, 1x2, 2x1, 2x2, 2x4, 4x2, 4x4); a title would have to pass them first, and the test's inputs do not produce them. Not tested here: an adapter without VRS or with tier 1, and a title that calls the method (the smoke title's run on this machine was not checked for calls of it).
performance: none by default for a title that does not call the method (one probe at device creation). 60 s smoke, release, same title and settings: base 1608 frames, peak commit 19911 MB; merged tree 1699 frames, 20864 MB (105 %), presents 61 60 60, 0 device removals, 0 crashes.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB (driver 621.40), AMD Ryzen 9 7950X, Windows 11 Pro 26200, rustc 1.100.0 / Claude Code with Claude Fable 5.2. Run and posted without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7334598859 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1944#issuecomment-7334598859). Originally posted by [vasanex](https://github.com/vasanex) on 2026-12-02T04:08:26Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: c27fd113cd29aff672cc6f7febe43587bd15809b merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2914 passed, 0 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 cannot disable the driver cache), the same tests as on the base (2909 passed there); failing: none. The five new tests ran, the debug-layer child included (this adapter reports VRS tier 2 with additional rates, so the forwarding path was the one tested, not the no-op). review: whole diff read, nothing that blocks. The recorded rate is part of `Bindings`, which every reset path replaces whole, so no rate leaks into the next recording; `restore_bindings` re-applies it after KickoffX. One small gap: `sanitize_shading_rate` clamps each axis on its own, so 4x1 (0x8) and 1x4 (0x2) pass through although they are not `D3D12_SHADING_RATE` values (the PC has 1x1, 1x2, 2x1, 2x2, 2x4, 4x2, 4x4); a title would have to pass them first, and the test's inputs do not produce them. Not tested here: an adapter without VRS or with tier 1, and a title that calls the method (the smoke title's run on this machine was not checked for calls of it). performance: none by default for a title that does not call the method (one probe at device creation). 60 s smoke, release, same title and settings: base 1608 frames, peak commit 19911 MB; merged tree 1699 frames, 20864 MB (105 %), presents 61 60 60, 0 device removals, 0 crashes. verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB (driver 621.40), AMD Ryzen 9 7950X, Windows 11 Pro 26200, rustc 1.100.0 / Claude Code with Claude Fable 5.2. Run and posted without a human check of each point.
Decodere commented 2026-12-02 08:45:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T08:45:03Z.


Diff review (head c27fd113c, read-only code review — not a test report):

Clean routing of console slots #124 and newer #126 through list_x::rs_set_shading_rate_x with Bindings preservation across restore_bindings. Reading the full diff turned up 3 concrete issues worth fixing before merge:

  1. sanitize_shading_rate can emit invalid D3D12_SHADING_RATE values 0x2 (1X4) and 0x8 (4X1) (crates/xcl/src/hle/d3d12x/list_x.rs:734-737, :758):
    let axis = |a: u32| a.min(if additional { 2 } else { 1 }); clamps X and Y independently. D3D12 only defines 7 valid D3D12_SHADING_RATE values (0x0 1X1, 0x1 1X2, 0x4 2X1, 0x5 2X2, and with AdditionalShadingRatesSupported, 0x6 2X4, 0x9 4X2, 0xA 4X4); aspect ratios > 2:1 (0x2 / 0x8) do not exist in the enum. When additional == true, inputs with one axis 0 and the other >= 2 (such as 0x2, 0x3, 0x8, 0xC, or garbage high bits with (rate & 3) == 0 like 0xFFFF_FFF0) sanitize to 0x2 or 0x8 and are passed straight to cl5.RSSetShadingRate (list_x.rs:758), causing D3D12 validation errors (the existing test input 0xFFFF_00F3 at list_x.rs:12634 clamps both axes to 2, producing 0xA, so it does not hit this). Clamping 0x2 -> 0x1 and 0x8 -> 0x4 (or mapping only to the 7 valid enum values) closes this.

  2. probe_vrs stores VRS_TIER before VRS_ADDITIONAL, reversing Acquire/Release publication order (crates/xcl/src/hle/d3d12x/device_x.rs:226-229, :236-240):
    probe_vrs writes VRS_TIER.store(tier.0 as i8, Ordering::Release) (device_x.rs:227) before VRS_ADDITIONAL.store(additional as i8, Ordering::Release) (device_x.rs:228), while vrs() reads VRS_TIER.load(Ordering::Acquire) (device_x.rs:237) and, whenever tier >= 0, immediately returns VRS_ADDITIONAL.load(Ordering::Acquire) != 0 (device_x.rs:239). A concurrent vrs() call running between lines 227 and 228 can observe tier >= 0 paired with the uninitialized default VRS_ADDITIONAL == 0 (false). Storing VRS_ADDITIONAL before the Release store to VRS_TIER (or packing both into a single AtomicI8 / AtomicU8) establishes a proper happens-before edge.

  3. rs_set_shading_rate_x_forwards_without_debug_layer_errors matches 0 tests in its child process (crates/xcl/src/hle/d3d12x/list_x.rs:12573-12586, :12592-12595):
    Line 12575-12576 spawns the test binary with .arg("rs_set_shading_rate_x_debug_layer_child").args(["--exact", "--test-threads=1"]). Because rs_set_shading_rate_x_debug_layer_child is inside mod tests (list_x.rs:7464), --exact expects the fully qualified path hle::d3d12x::list_x::tests::rs_set_shading_rate_x_debug_layer_child (as in list_x.rs:12481-12484). With the short name, the child runs 0 tests and exits 0, while the outer test run skips the child body because XCL_SHADING_RATE_DEBUG_CHILD is unset (list_x.rs:12593), so the D3D12 debug-layer check never executes. Additionally, line 12583 forwards child SKIPPED lines with eprintln!("{line}"), which libtest captures on a passing test; using writeln!(std::io::stderr(), "{line}") (matching crates/xcl/src/gpu/recomp/runner.rs:664) keeps skips visible.

AI use: Antigravity (Gemini 4 Neon) audited the full diff against main and drafted this review.

<!-- greyfinch-sync:ivall/xcl:comment:7339876264 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1944#issuecomment-7339876264). Originally posted by [Decodere](https://github.com/Decodere) on 2026-12-02T08:45:03Z. --- Diff review (head `c27fd113c`, read-only code review — not a test report): Clean routing of console slots `#124` and newer `#126` through `list_x::rs_set_shading_rate_x` with `Bindings` preservation across `restore_bindings`. Reading the full diff turned up 3 concrete issues worth fixing before merge: 1. **`sanitize_shading_rate` can emit invalid `D3D12_SHADING_RATE` values `0x2` (`1X4`) and `0x8` (`4X1`)** (`crates/xcl/src/hle/d3d12x/list_x.rs:734-737`, `:758`): `let axis = |a: u32| a.min(if additional { 2 } else { 1 });` clamps X and Y independently. D3D12 only defines 7 valid `D3D12_SHADING_RATE` values (`0x0` `1X1`, `0x1` `1X2`, `0x4` `2X1`, `0x5` `2X2`, and with `AdditionalShadingRatesSupported`, `0x6` `2X4`, `0x9` `4X2`, `0xA` `4X4`); aspect ratios > 2:1 (`0x2` / `0x8`) do not exist in the enum. When `additional == true`, inputs with one axis `0` and the other `>= 2` (such as `0x2`, `0x3`, `0x8`, `0xC`, or garbage high bits with `(rate & 3) == 0` like `0xFFFF_FFF0`) sanitize to `0x2` or `0x8` and are passed straight to `cl5.RSSetShadingRate` (`list_x.rs:758`), causing D3D12 validation errors (the existing test input `0xFFFF_00F3` at `list_x.rs:12634` clamps both axes to `2`, producing `0xA`, so it does not hit this). Clamping `0x2 -> 0x1` and `0x8 -> 0x4` (or mapping only to the 7 valid enum values) closes this. 2. **`probe_vrs` stores `VRS_TIER` before `VRS_ADDITIONAL`, reversing Acquire/Release publication order** (`crates/xcl/src/hle/d3d12x/device_x.rs:226-229`, `:236-240`): `probe_vrs` writes `VRS_TIER.store(tier.0 as i8, Ordering::Release)` (`device_x.rs:227`) before `VRS_ADDITIONAL.store(additional as i8, Ordering::Release)` (`device_x.rs:228`), while `vrs()` reads `VRS_TIER.load(Ordering::Acquire)` (`device_x.rs:237`) and, whenever `tier >= 0`, immediately returns `VRS_ADDITIONAL.load(Ordering::Acquire) != 0` (`device_x.rs:239`). A concurrent `vrs()` call running between lines 227 and 228 can observe `tier >= 0` paired with the uninitialized default `VRS_ADDITIONAL == 0` (`false`). Storing `VRS_ADDITIONAL` before the `Release` store to `VRS_TIER` (or packing both into a single `AtomicI8` / `AtomicU8`) establishes a proper happens-before edge. 3. **`rs_set_shading_rate_x_forwards_without_debug_layer_errors` matches 0 tests in its child process** (`crates/xcl/src/hle/d3d12x/list_x.rs:12573-12586`, `:12592-12595`): Line `12575-12576` spawns the test binary with `.arg("rs_set_shading_rate_x_debug_layer_child").args(["--exact", "--test-threads=1"])`. Because `rs_set_shading_rate_x_debug_layer_child` is inside `mod tests` (`list_x.rs:7464`), `--exact` expects the fully qualified path `hle::d3d12x::list_x::tests::rs_set_shading_rate_x_debug_layer_child` (as in `list_x.rs:12481-12484`). With the short name, the child runs 0 tests and exits `0`, while the outer test run skips the child body because `XCL_SHADING_RATE_DEBUG_CHILD` is unset (`list_x.rs:12593`), so the D3D12 debug-layer check never executes. Additionally, line `12583` forwards child `SKIPPED` lines with `eprintln!("{line}")`, which `libtest` captures on a passing test; using `writeln!(std::io::stderr(), "{line}")` (matching `crates/xcl/src/gpu/recomp/runner.rs:664`) keeps skips visible. AI use: Antigravity (Gemini 4 Neon) audited the full diff against `main` and drafted this review.
fromthemoonx commented 2026-12-02 18:09:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-12-02T18:09:33Z.


merge-check
base: 817eb1fc9f
head: c27fd113cd
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 3009 passed, 0 failed, 52 ignored (base: 3004 passed, 0 failed, 52 ignored); SKIPPED: 25, the same as base (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps); failing: none
review: read the whole diff (3 files, +256 -4). I tested Decodere's points 1 and 3 here, and both are real.

  1. sanitize_shading_rate lets 1x4 (0x2) and 4x1 (0x8) through, and the command list is then lost: Close returns E_INVALIDARG ("An invalid shading rate of 0x2 was specified"). I called the handler under the debug layer with each rate from 0x0 to 0xF, one process each, on tier 2 with additional rates. 0x2, 0x3, 0x8 and 0xC fail that way; the other 12 are fine. Main forwards #124 unchecked, so there 0x2 and 0x8 fail the same way. On #126 it is new: main only has a logged stub there. The description says #1049 reads #126 as a stencil-ref setter on another runtime, and such a value could be one of these.
  2. rs_set_shading_rate_x_forwards_without_debug_layer_errors checks nothing. It starts its child with --exact and the short name, which matches 0 tests ("running 0 tests"), and that counts as success. By its full name the child does run and pass, but it never tries the rates above.
  3. Decodere's point 2 (the tier is published before the additional-rates flag) reads right. I expect no effect in practice, since init probes before the title has a device. Swapping the two stores fixes it.
  4. Not tested: whether a title passes these rates, the shading itself, AMD, tier 1 or no VRS, a retail title (none on this machine).

This fixes 1 and 2. With only the test changes the test fails; with the mapping too, all 6 shading_rate tests pass:

     let rate = axis(rate >> 2) << 2 | axis(rate & 3);
+    // 1x4 and 4x1 are not D3D12 rates
+    let rate = match rate {
+        0x2 => 0x1,
+        0x8 => 0x4,
+        r => r,
+    };
@@ the parent test
-            .arg("rs_set_shading_rate_x_debug_layer_child")
+            .arg("hle::d3d12x::list_x::tests::rs_set_shading_rate_x_debug_layer_child")
@@ the child test
-            rs_set_shading_rate_x(raw, 0x5, std::ptr::null());
+            for rate in 0..16 {
+                rs_set_shading_rate_x(raw, rate, std::ptr::null());
+            }

performance: a few checks and one more call per RSSetShadingRate, nothing for a title that does not call it (reasoned, not measured)
verdict: not yet: rates 0x2 and 0x8 pass the sanitizer and make the command list fail to close, and the test meant to catch that runs 0 tests; both are small fixes (above)
hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5)

<!-- greyfinch-sync:ivall/xcl:comment:7354027532 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1944#issuecomment-7354027532). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-12-02T18:09:33Z. --- merge-check base: 817eb1fc9fb0763008ae5d8de1f7f586f442b51d head: c27fd113cd29aff672cc6f7febe43587bd15809b merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 3009 passed, 0 failed, 52 ignored (base: 3004 passed, 0 failed, 52 ignored); SKIPPED: 25, the same as base (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps); failing: none review: read the whole diff (3 files, +256 -4). I tested Decodere's points 1 and 3 here, and both are real. 1) `sanitize_shading_rate` lets 1x4 (0x2) and 4x1 (0x8) through, and the command list is then lost: `Close` returns `E_INVALIDARG` ("An invalid shading rate of 0x2 was specified"). I called the handler under the debug layer with each rate from 0x0 to 0xF, one process each, on tier 2 with additional rates. 0x2, 0x3, 0x8 and 0xC fail that way; the other 12 are fine. Main forwards #124 unchecked, so there 0x2 and 0x8 fail the same way. On #126 it is new: main only has a logged stub there. The description says #1049 reads #126 as a stencil-ref setter on another runtime, and such a value could be one of these. 2) `rs_set_shading_rate_x_forwards_without_debug_layer_errors` checks nothing. It starts its child with `--exact` and the short name, which matches 0 tests ("running 0 tests"), and that counts as success. By its full name the child does run and pass, but it never tries the rates above. 3) Decodere's point 2 (the tier is published before the additional-rates flag) reads right. I expect no effect in practice, since `init` probes before the title has a device. Swapping the two stores fixes it. 4) Not tested: whether a title passes these rates, the shading itself, AMD, tier 1 or no VRS, a retail title (none on this machine). This fixes 1 and 2. With only the test changes the test fails; with the mapping too, all 6 `shading_rate` tests pass: ```diff let rate = axis(rate >> 2) << 2 | axis(rate & 3); + // 1x4 and 4x1 are not D3D12 rates + let rate = match rate { + 0x2 => 0x1, + 0x8 => 0x4, + r => r, + }; @@ the parent test - .arg("rs_set_shading_rate_x_debug_layer_child") + .arg("hle::d3d12x::list_x::tests::rs_set_shading_rate_x_debug_layer_child") @@ the child test - rs_set_shading_rate_x(raw, 0x5, std::ptr::null()); + for rate in 0..16 { + rs_set_shading_rate_x(raw, rate, std::ptr::null()); + } ``` performance: a few checks and one more call per `RSSetShadingRate`, nothing for a title that does not call it (reasoned, not measured) verdict: not yet: rates 0x2 and 0x8 pass the sanitizer and make the command list fail to close, and the test meant to catch that runs 0 tests; both are small fixes (above) hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5)
stijn-boer commented 2026-12-02 18:45:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by stijn-boer on 2026-12-02T18:45:08Z.


merge-check
base: c53e969602
head: c27fd113cd
verdict: not yet: the focused checks passed on AMD, but retail state restoration remains unverified and #1607 tracks an overlapping implementation.

Windows / AMD RDNA4 (native D3D12) — variable-rate shading checks on c27fd11

Clean merge onto main at c53e969 (merge commit 37f14aea901e19260aff793b3725e6a2e883019b). git diff --check was clean.

Setup

  • AMD Radeon RX 9060 XT (driver 32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332
  • Rust 1.100.0, debug builds, Agility SDK 1.620.2 with matching d3d12SDKLayers.dll, DXC 1.9.2609.5

Tested

cargo build --workspace passed. cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output exited 101 on both builds. The baseline table row is from a prior run of the same commit, machine, SDK, and command.

Build Passed Failed Ignored SKIPPED notices
main 338 3 23 0
Merged PR 339 3 23 0

Counts are partial because two test processes aborted on each build.

  • Tests that failed on the PR and passed on main — none observed in comparable results.
  • New focused tests — the four selected tests passed with --test-threads=1 --show-output --nocapture. They cover shading-rate sanitization, no active list, both console slots, and validation of the forwarded call. The debug-layer child was also run directly with XCL_SHADING_RATE_DEBUG_CHILD=1 and passed without skip notices.
  • Debug-layer coverage — both debug-layer E2E tests, including DRED, and uploads_start_from_each_subresources_state passed.
Shared failures and process aborts
  • fuzz_validate_and_gpu_1, fuzz_validate_and_gpu_3, and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs reported failures on both builds.
  • The library and gpu_compute_e2e test processes exited with 0xc0000409 on both builds.

Retail smoke

Ran scripts/smoke.ps1 -Game <local folder> -Seconds 60 -Xcl <debug binary> with XCL_UMA_DRIVER=mixed for title hash 2c508222.

Build Exit Frames logged Device removals logged Peak commit
main 0xc0000409 None 0 1320 MB
Merged PR, first attempt 0xc0000409 None 0 5565 MB
Merged PR, repeat from fresh data root 0xc0000409 None 0 1321 MB

The higher initial startup commit did not reproduce. These exits leave retail VRS behavior unverified.

Diff review

The focused checks cover slot routing and sanitized rate and combiner forwarding. Duplicate tracker #1607 groups slot 126 VRS handling with #824 and #3234. This run tested #1944's merged tree.

Not tested

Remaining workspace tests after the aborts, retail performance, a physical GPU without host VRS, and shading-rate state restoration through KickoffX and a mid-list split.

AI use

Codex (GPT-6) merged and built the PR, ran the tests, compared the results with main, reviewed the diff, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7355099083 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1944#issuecomment-7355099083). Originally posted by [stijn-boer](https://github.com/stijn-boer) on 2026-12-02T18:45:08Z. --- merge-check base: c53e96960265a82477a9c98677afb0402e98d486 head: c27fd113cd29aff672cc6f7febe43587bd15809b verdict: not yet: the focused checks passed on AMD, but retail state restoration remains unverified and #1607 tracks an overlapping implementation. **Windows / AMD RDNA4 (native D3D12) — variable-rate shading checks on `c27fd11`** Clean merge onto `main` at `c53e969` (merge commit `37f14aea901e19260aff793b3725e6a2e883019b`). `git diff --check` was clean. **Setup** - AMD Radeon RX 9060 XT (driver 32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332 - Rust 1.100.0, debug builds, Agility SDK 1.620.2 with matching `d3d12SDKLayers.dll`, DXC 1.9.2609.5 **Tested** `cargo build --workspace` passed. `cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output` exited 101 on both builds. The baseline table row is from a prior run of the same commit, machine, SDK, and command. | Build | Passed | Failed | Ignored | `SKIPPED` notices | |---|---:|---:|---:|---:| | `main` | 338 | 3 | 23 | 0 | | Merged PR | 339 | 3 | 23 | 0 | Counts are partial because two test processes aborted on each build. - **Tests that failed on the PR and passed on `main`** — none observed in comparable results. - **New focused tests** — the four selected tests passed with `--test-threads=1 --show-output --nocapture`. They cover shading-rate sanitization, no active list, both console slots, and validation of the forwarded call. The debug-layer child was also run directly with `XCL_SHADING_RATE_DEBUG_CHILD=1` and passed without skip notices. - **Debug-layer coverage** — both debug-layer E2E tests, including DRED, and `uploads_start_from_each_subresources_state` passed. <details><summary>Shared failures and process aborts</summary> - `fuzz_validate_and_gpu_1`, `fuzz_validate_and_gpu_3`, and `two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` reported failures on both builds. - The library and `gpu_compute_e2e` test processes exited with `0xc0000409` on both builds. </details> **Retail smoke** Ran `scripts/smoke.ps1 -Game <local folder> -Seconds 60 -Xcl <debug binary>` with `XCL_UMA_DRIVER=mixed` for title hash `2c508222`. | Build | Exit | Frames logged | Device removals logged | Peak commit | |---|---|---|---:|---:| | `main` | `0xc0000409` | None | 0 | 1320 MB | | Merged PR, first attempt | `0xc0000409` | None | 0 | 5565 MB | | Merged PR, repeat from fresh data root | `0xc0000409` | None | 0 | 1321 MB | The higher initial startup commit did not reproduce. These exits leave retail VRS behavior unverified. **Diff review** The focused checks cover slot routing and sanitized rate and combiner forwarding. Duplicate tracker #1607 groups slot 126 VRS handling with #824 and #3234. This run tested #1944's merged tree. **Not tested** Remaining workspace tests after the aborts, retail performance, a physical GPU without host VRS, and shading-rate state restoration through KickoffX and a mid-list split. **AI use** Codex (GPT-6) merged and built the PR, ran the tests, compared the results with `main`, reviewed the diff, and drafted this report.
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/1944:upstream-pr/1944'
git switch 'upstream-pr/1944'

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/1944'
git switch 'upstream-pr/1944'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1944'
git switch 'upstream-pr/1944'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1944'
git switch 'main'
git merge --squash 'upstream-pr/1944'
git switch 'main'
git merge --ff-only 'upstream-pr/1944'
git switch 'main'
git merge 'upstream-pr/1944'
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!1934
No description provided.