dxil: emit InnerCoverage, ShadingRate, MeshDerivatives, and 64UAVs flags in graphics shaders #2441

Merged
Decodere merged 1 commit from upstream-pr/2451 into main 2026-11-29 12:18:31 +00:00
Decodere commented 2026-11-25 19:24:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-25T19:24:25Z.


Emit four DXIL shader-flag and SFI0 feature bits in Shader::try_finish_graphics that dxil.dll requires when the corresponding graphics features are used: InnerCoverage, ShadingRate, DerivativesInMeshAndAmpShaders, and 64UAVs. Part of #1401. Part of #1833.

What is in it

  • crates/xcl/src/gpu/dxil/graphics.rs (Shader::try_finish_graphics):
    • Count static UAV bindings (self.bindings with ResClass::Uav) and emit 64UAVs (flags |= 1 << 15, sfi0 |= 0x8) across vertex, pixel, and mesh shaders whenever more than 8 static UAVs are bound (while preserving UavsAtEveryStage 1 << 16 / 0x4 for vertex shaders with any static UAV).
    • Emit ShadingRate (flags |= 1 << 24, sfi0 |= 0x8_0000) when Stage::Vertex outputs or Stage::Pixel inputs contain SemKind::ShadingRate (excluding Stage::Mesh primitive outputs, matching DXC).
    • Scan surviving post-optimize() instructions on Stage::Pixel and Stage::Mesh to emit InnerCoverage (flags |= 1 << 10, sfi0 |= 0x400) when dx.op.innerCoverage. (op 92) survives, and DerivativesInMeshAndAmpShaders (flags |= 1 << 29, sfi0 |= 0x100_0000) when mesh derivative or implicit-LOD ops (dx.op.unary. ops 83..=86, dx.op.sample. op 60, dx.op.sampleBias. op 61, dx.op.sampleCmp. op 64, dx.op.calculateLOD. op 81) survive; eliminated calls in unreachable blocks and dead-code-eliminated derivatives do not emit spurious flags.
  • crates/xcl/src/gpu/dxil/graphics_tests.rs:
    • Added four CPU/DXC-validated unit tests (ps_inner_coverage_sets_flag_only_when_live, shading_rate_sets_flag_for_vs_and_ps_but_not_ms, ms_derivatives_and_implicit_lod_set_flag_but_explicit_lod_does_not, graphics_64_uavs_flag_tracks_static_uav_count) asserting validate::validate, exact SFI0 values, disassembly metadata flags, and negative guards (unreachable inner coverage, mesh primitive shading rate, explicit sample_level and DCE'd mesh derivative, 8 static UAVs, and a single UAV at register u8).

Tested

  • Hardware / toolchain: NVIDIA GeForce RTX 4060 8 GB (driver 621.14, 32-lane waves), Intel Core i5-11400F, Windows 11 Home build 26200, Rust 1.100.0, DXC / dxil.dll 1.9.2609.5, release build.
  • Failing-first before the graphics.rs fix (on origin/main 943043e): all 4 new tests failed (0 passed, 4 failed on missing SFI0 bits).
  • Targeted cargo test --release -p xcl --lib -- gpu::dxil::graphics::tests:: --nocapture:
    • RTX 4060: 29 passed, 0 failed, 0 ignored (0.28 s, 0 skipped).
    • XCL_ADAPTER=warp: 29 passed, 0 failed, 0 ignored (0.03 s; 0 skipped on the 4 new tests, 2 pre-existing draw tests skipped: no wave64).
  • cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture (RTX 4060): 1367 passed, 0 failed, 46 ignored across 24 test binaries (184/184 gpu::dxil::* passed; 29 pre-existing SKIPPED GPU/environment checks: 21 no wave64, 3 per-lane wave32 refused, 3 no D3D12 debug layer, 1 no heap windows, 1 cannot disable driver cache; 0 skipped in gpu::dxil::graphics::tests).

Regression run
main:

xcl-smoke v1
commit: 2898511af1c038a2ef809719e9b6f89e5675c422
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1535 (PresentX 1536)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13996 MB

PR:

xcl-smoke v1
commit: 2e6e6ab8d6d8e453947020d777ca335630d85940
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1532 (PresentX 1532)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14013 MB

Not tested

  • Native wave64 GPU execution on wave64 hardware and D3D12 debug-layer tests requiring d3d12SDKLayers.dll.
  • Live runtime rendering of titles executing hardware VRS, conservative inner coverage, or mesh-shader implicit-LOD draws beyond DXC 1.9 validation and the 60 s title smoke test.

AI use

  • Google Antigravity (Gemini 4 Neon) implemented the flag emission in graphics.rs, wrote the DXC-validated tests in graphics_tests.rs, ran the test/smoke suites, and drafted this PR description.
<!-- greyfinch-sync:ivall/xcl:issue:5497710161 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2451). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-25T19:24:25Z. --- Emit four DXIL shader-flag and `SFI0` feature bits in `Shader::try_finish_graphics` that `dxil.dll` requires when the corresponding graphics features are used: `InnerCoverage`, `ShadingRate`, `DerivativesInMeshAndAmpShaders`, and `64UAVs`. Part of #1401. Part of #1833. **What is in it** - `crates/xcl/src/gpu/dxil/graphics.rs` (`Shader::try_finish_graphics`): - Count static UAV bindings (`self.bindings` with `ResClass::Uav`) and emit `64UAVs` (`flags |= 1 << 15`, `sfi0 |= 0x8`) across vertex, pixel, and mesh shaders whenever more than 8 static UAVs are bound (while preserving `UavsAtEveryStage` `1 << 16` / `0x4` for vertex shaders with any static UAV). - Emit `ShadingRate` (`flags |= 1 << 24`, `sfi0 |= 0x8_0000`) when `Stage::Vertex` outputs or `Stage::Pixel` inputs contain `SemKind::ShadingRate` (excluding `Stage::Mesh` primitive outputs, matching DXC). - Scan surviving post-`optimize()` instructions on `Stage::Pixel` and `Stage::Mesh` to emit `InnerCoverage` (`flags |= 1 << 10`, `sfi0 |= 0x400`) when `dx.op.innerCoverage.` (op 92) survives, and `DerivativesInMeshAndAmpShaders` (`flags |= 1 << 29`, `sfi0 |= 0x100_0000`) when mesh derivative or implicit-LOD ops (`dx.op.unary.` ops `83..=86`, `dx.op.sample.` op `60`, `dx.op.sampleBias.` op `61`, `dx.op.sampleCmp.` op `64`, `dx.op.calculateLOD.` op `81`) survive; eliminated calls in unreachable blocks and dead-code-eliminated derivatives do not emit spurious flags. - `crates/xcl/src/gpu/dxil/graphics_tests.rs`: - Added four CPU/DXC-validated unit tests (`ps_inner_coverage_sets_flag_only_when_live`, `shading_rate_sets_flag_for_vs_and_ps_but_not_ms`, `ms_derivatives_and_implicit_lod_set_flag_but_explicit_lod_does_not`, `graphics_64_uavs_flag_tracks_static_uav_count`) asserting `validate::validate`, exact `SFI0` values, disassembly metadata flags, and negative guards (unreachable inner coverage, mesh primitive shading rate, explicit `sample_level` and DCE'd mesh derivative, 8 static UAVs, and a single UAV at register `u8`). **Tested** - Hardware / toolchain: NVIDIA GeForce RTX 4060 8 GB (driver 621.14, 32-lane waves), Intel Core i5-11400F, Windows 11 Home build 26200, Rust 1.100.0, DXC / `dxil.dll` 1.9.2609.5, release build. - Failing-first before the `graphics.rs` fix (on `origin/main` `943043e`): all 4 new tests failed (`0 passed, 4 failed` on missing `SFI0` bits). - Targeted `cargo test --release -p xcl --lib -- gpu::dxil::graphics::tests:: --nocapture`: - RTX 4060: `29 passed, 0 failed, 0 ignored` (`0.28 s`, `0` skipped). - `XCL_ADAPTER=warp`: `29 passed, 0 failed, 0 ignored` (`0.03 s`; `0` skipped on the 4 new tests, `2` pre-existing draw tests skipped: `no wave64`). - `cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture` (RTX 4060): `1367 passed, 0 failed, 46 ignored` across `24` test binaries (`184/184` `gpu::dxil::*` passed; `29` pre-existing `SKIPPED` GPU/environment checks: `21` no wave64, `3` per-lane wave32 refused, `3` no D3D12 debug layer, `1` no heap windows, `1` cannot disable driver cache; `0` skipped in `gpu::dxil::graphics::tests`). **Regression run** main: ``` xcl-smoke v1 commit: 2898511af1c038a2ef809719e9b6f89e5675c422 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1535 (PresentX 1536) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13996 MB ``` PR: ``` xcl-smoke v1 commit: 2e6e6ab8d6d8e453947020d777ca335630d85940 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1532 (PresentX 1532) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14013 MB ``` **Not tested** - Native wave64 GPU execution on wave64 hardware and D3D12 debug-layer tests requiring `d3d12SDKLayers.dll`. - Live runtime rendering of titles executing hardware VRS, conservative inner coverage, or mesh-shader implicit-LOD draws beyond DXC 1.9 validation and the 60 s title smoke test. **AI use** - Google Antigravity (Gemini 4 Neon) implemented the flag emission in `graphics.rs`, wrote the DXC-validated tests in `graphics_tests.rs`, ran the test/smoke suites, and drafted this PR description.
emirduran707 commented 2026-11-25 20:08:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-25T19:41:12Z.


Independent AMD RDNA4 (native wave64) test report on exact head 2e6e6ab8d6d8e453947020d777ca335630d85940 (clean detached checkout, no local changes).

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1365 passed, 2 failed, 46 ignored; 8 SKIPPED (6 in lower_dxil::tests::{f16,f32}_programs_on_the_gpu refused by per-lane form; heap_window_out_of_memory_falls_back_to_the_switch_form; pso_measurement_compiles_an_exact_synthetic_record). All gpu::dxil::graphics_tests and native wave64 GPU tests ran and passed.
    • The 2 failures (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 seed 722 and fuzz_validate_and_gpu_3 seed 1599) are pre-existing on unmodified main on this GPU.

Regression run (60 s retail-title smoke, XCL_NETWORK=0, release)

xcl-smoke v1
commit: 2e6e6ab8d6d8e453947020d777ca335630d85940
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1544 (PresentX 1544)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14013 MB

(Matched main 68a284a baseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)

Not tested

  • D3D12 debug layer; Intel GPUs.

AI use

  • Antigravity with Gemini 4 Neon ran the build, test suite, and smoke run and drafted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7172633564 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2451#issuecomment-7172633564). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-25T19:41:12Z. --- Independent AMD RDNA4 (native wave64) test report on exact head `2e6e6ab8d6d8e453947020d777ca335630d85940` (clean detached checkout, no local changes). **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2602.17; tests debug, smoke release. - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4`: **1365 passed, 2 failed, 46 ignored; 8 SKIPPED** (6 in `lower_dxil::tests::{f16,f32}_programs_on_the_gpu` refused by per-lane form; `heap_window_out_of_memory_falls_back_to_the_switch_form`; `pso_measurement_compiles_an_exact_synthetic_record`). All `gpu::dxil::graphics_tests` and native wave64 GPU tests ran and passed. - The 2 failures (`gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` seed 722 and `fuzz_validate_and_gpu_3` seed 1599) are pre-existing on unmodified `main` on this GPU. **Regression run** (60 s retail-title smoke, `XCL_NETWORK=0`, release) ``` xcl-smoke v1 commit: 2e6e6ab8d6d8e453947020d777ca335630d85940 gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1544 (PresentX 1544) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14013 MB ``` (Matched `main` `68a284a` baseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.) **Not tested** - D3D12 debug layer; Intel GPUs. **AI use** - Antigravity with Gemini 4 Neon ran the build, test suite, and smoke run and drafted this report.
SlopTart commented 2026-11-25 20:08:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T20:02:46Z.


gpu_ suite (cold cache): 160 passed / 4 failed, no crashes. The four are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, depth-buffer state refusal, and gpu_promoted_uav_clear_values_pass_create_committed_resource (report); none caused by this PR.

<!-- greyfinch-sync:ivall/xcl:comment:7173111173 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2451#issuecomment-7173111173). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-25T20:02:46Z. --- `gpu_` suite (cold cache): 160 passed / 4 failed, no crashes. The four are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, depth-buffer state refusal, and `gpu_promoted_uav_clear_values_pass_create_committed_resource` ([report](https://github.com/xcl-dev/xcl/pull/2280#issuecomment-7172066690)); none caused by this PR.
bmjask commented 2026-11-25 20:34:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T20:34:27Z.

Review: COMMENTED


No concrete source-level defect found. Post-opt scans, stage gates, and 64-UAV detection look correct; focused SFI0/metadata/container tests and current Windows CI are green, with AMD/NVIDIA evidence. Residual gap is only the disclosed absence of a live title exercising VRS, inner coverage, or mesh implicit-LOD rendering; I found no blocker.

<!-- greyfinch-sync:ivall/xcl:review:6064589535 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2451#pullrequestreview-6064589535). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-25T20:34:27Z. **Review:** COMMENTED --- No concrete source-level defect found. Post-opt scans, stage gates, and 64-UAV detection look correct; focused SFI0/metadata/container tests and current Windows CI are green, with AMD/NVIDIA evidence. Residual gap is only the disclosed absence of a live title exercising VRS, inner coverage, or mesh implicit-LOD rendering; I found no blocker.
DavidM1911 commented 2026-11-25 21:05:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T20:21:57Z.


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:7173561729 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2451#issuecomment-7173561729). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T20:21:57Z. --- 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!
ClosetPie107 commented 2026-11-27 18:00:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-27T18:00:48Z.


Tested on AMD / Linux: 2e6e6ab8 (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimental experimental-11.0-20261112 with vkd3d-proton master ec207194 plus a local patch dropping the lpVtbl checks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0, x86_64-pc-windows-gnu debug build, tests run under Wine)

The head as it is (not merged onto current main), with its base 2898511a the same session as the baseline.

Tests (XCL_REQUIRE_GPU=wave64)

  • cargo test -p xcl --lib -- ps_inner_coverage_sets_flag_only_when_live shading_rate_sets_flag_for_vs_and_ps_but_not_ms ms_derivatives_and_implicit_lod_set_flag_but_explicit_lod_does_not graphics_64_uavs_flag_tracks_static_uav_count --test-threads=1: 4 passed, 0 failed, 0 ignored.
  • cargo test -p xcl --lib -- gpu::dxil::graphics --test-threads=1: 29 passed, 0 failed, 0 ignored.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 with --skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole (the first loses the RADV device here, the other two run out of memory under Wine): lib 1277 passed, 10 failed, 26 ignored; base 2898511a lib (same flags): 1261 passed, 22 failed, 26 ignored. All of this head's failures are among the base's; the base fails 12 more (texture, sparse, vram and a few other tests). The other binaries fail the same 3 tests as on main here (e2e, pls_quota, predication_e2e).

Not tested

  • A retail title
  • Native Windows, NVIDIA / Intel

AI use

  • Claude Code (Claude Opus 5.5) wrote the test scripts, ran the builds and tests on my machine and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7225024301 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2451#issuecomment-7225024301). Originally posted by [ClosetPie107](https://github.com/ClosetPie107) on 2026-11-27T18:00:48Z. --- **Tested on AMD / Linux: `2e6e6ab8`** (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimental `experimental-11.0-20261112` with vkd3d-proton master `ec207194` plus a local patch dropping the `lpVtbl` checks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0, `x86_64-pc-windows-gnu` debug build, tests run under Wine) The head as it is (not merged onto current `main`), with its base `2898511a` the same session as the baseline. **Tests** (`XCL_REQUIRE_GPU=wave64`) - `cargo test -p xcl --lib -- ps_inner_coverage_sets_flag_only_when_live shading_rate_sets_flag_for_vs_and_ps_but_not_ms ms_derivatives_and_implicit_lod_set_flag_but_explicit_lod_does_not graphics_64_uavs_flag_tracks_static_uav_count --test-threads=1`: **4 passed, 0 failed**, 0 ignored. - `cargo test -p xcl --lib -- gpu::dxil::graphics --test-threads=1`: **29 passed, 0 failed**, 0 ignored. - `cargo test --workspace --no-fail-fast -- --test-threads=4` with `--skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole` (the first loses the RADV device here, the other two run out of memory under Wine): lib 1277 passed, 10 failed, 26 ignored; base `2898511a` lib (same flags): 1261 passed, 22 failed, 26 ignored. All of this head's failures are among the base's; the base fails 12 more (texture, sparse, vram and a few other tests). The other binaries fail the same 3 tests as on `main` here (`e2e`, `pls_quota`, `predication_e2e`). **Not tested** - A retail title - Native Windows, NVIDIA / Intel **AI use** - Claude Code (Claude Opus 5.5) wrote the test scripts, ran the builds and tests on my machine and wrote this report.
throny commented 2026-11-28 23:26:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T23:26:18Z.


merge-check claim
head: 2e6e6ab8d6

<!-- greyfinch-sync:ivall/xcl:comment:7247430442 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2451#issuecomment-7247430442). Originally posted by [throny](https://github.com/throny) on 2026-11-28T23:26:18Z. --- merge-check claim head: 2e6e6ab8d6d8e453947020d777ca335630d85940
throny commented 2026-11-29 00:11:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-29T00:11:35Z.


merge-check
base: 851bf7f9
head: 2e6e6ab8d6
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2600 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at 851bf7f9: 2596 passed, 0 failed, 49 ignored.
review: no blocking finding; all hunks read. The four flag bits match the compiler's numbering (64 UAVs, inner coverage, shading rate, derivatives in mesh shaders) and the opcodes that set them are the right ones. On current main only the 64-UAV flag can actually be set, because the direct translator builds no shader that emits the other three features; every GPU that runs this path has 64 UAVs, so no shader that worked before can be refused. To know for later: once the translator emits shading rate, inner coverage or mesh derivatives, a GPU without the matching feature will refuse such a shader, which is then the correct outcome. Not confirmed by me: that the validator checks declared flags against use (the tests compare our own output).
performance: a cheap instruction scan for pixel and mesh shaders. It changes a direct-DXIL source only: that path's cache entries are translated again once; the HLSL path is untouched.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7247940123 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2451#issuecomment-7247940123). Originally posted by [throny](https://github.com/throny) on 2026-11-29T00:11:35Z. --- merge-check base: 851bf7f9 head: 2e6e6ab8d6d8e453947020d777ca335630d85940 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2600 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at 851bf7f9: 2596 passed, 0 failed, 49 ignored. review: no blocking finding; all hunks read. The four flag bits match the compiler's numbering (64 UAVs, inner coverage, shading rate, derivatives in mesh shaders) and the opcodes that set them are the right ones. On current main only the 64-UAV flag can actually be set, because the direct translator builds no shader that emits the other three features; every GPU that runs this path has 64 UAVs, so no shader that worked before can be refused. To know for later: once the translator emits shading rate, inner coverage or mesh derivatives, a GPU without the matching feature will refuse such a shader, which is then the correct outcome. Not confirmed by me: that the validator checks declared flags against use (the tests compare our own output). performance: a cheap instruction scan for pixel and mesh shaders. It changes a direct-DXIL source only: that path's cache entries are translated again once; the HLSL path is untouched. verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
iggyvilla commented 2026-11-29 06:16:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by iggyvilla on 2026-11-29T06:16:47Z.


merge-check
base: fa204595a4
head: 2e6e6ab8d6
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2609 passed, 3 failed, 49 ignored; failing: the same three as on the base (fuzz_validate_and_gpu_1, test_title_runs_and_game_folder_is_untouched (e2e), two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs), each re-run on the base with the same failure. The first full run's lib test binary aborted before its summary (uma_driver coherent-window restore tests, Windows error 487); the totals are the -p xcl --lib re-run (2472 passed, 1 failed) plus the other targets of the full run (137 passed, 2 failed, 20 ignored).
review: no blocking finding. All hunks read. The four flag/SFI0 bit pairs (64UAVs 1<<15/0x8, InnerCoverage 1<<10/0x400, ShadingRate 1<<24/0x8_0000, DerivativesInMeshAndAmpShaders 1<<29/0x100_0000) match the opcodes/conditions checked; scan runs after optimize() so dead/unreachable uses do not set flags (covered by negative test guards). Heap handles never enter self.bindings (handle_from_heap path), so the UAV count is static-only as the comment claims. "dx.op.sample." prefix cannot collide with sampleBias/sampleCmp (trailing-dot mismatch) and those are checked separately. Mesh primitive ShadingRate outputs deliberately excluded, vertex/pixel covered. Minor only: the scan computes both inner_cov and mesh_deriv for both stages while each stage consumes one; first-arg opcode convention (args.first()) matches how these dx.op calls are built elsewhere. I did not independently re-derive the DXC flag numbers beyond the tests' exact-SFI0 + disassembly-metadata + validate assertions.
performance: a single linear scan over surviving call instructions at graphics-shader build time; negligible and not per-frame. Direct-DXIL cache entries retranslate once; HLSL path untouched.
verdict: safe to merge
hardware / tool and model: AMD Radeon RX 6650 XT, Windows 10.0.26300; Muse Spark 1.3 (via pi) ran the build and tests in a prepared trial-merge worktree and drafted the review/performance lines; Claude Sonnet 5.5 (Claude Code) prepared the merge worktrees, read every hunk of the diff, checked the test counts and that the PR's own tests ran and passed in the logs, edited this text and posted it.

AI use: the two models above did all of this; the account owner did not read the diff or write this text. Claude Sonnet 5.5 read the whole diff; Muse Spark 1.3 only ran the commands and drafted lines. What was not done: no game run, NVIDIA or Intel GPU, or Linux.

<!-- greyfinch-sync:ivall/xcl:comment:7251757656 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2451#issuecomment-7251757656). Originally posted by [iggyvilla](https://github.com/iggyvilla) on 2026-11-29T06:16:47Z. --- merge-check base: fa204595a488c60c6c5f905244f0172072c9c2a9 head: 2e6e6ab8d6d8e453947020d777ca335630d85940 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2609 passed, 3 failed, 49 ignored; failing: the same three as on the base (fuzz_validate_and_gpu_1, test_title_runs_and_game_folder_is_untouched (e2e), two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs), each re-run on the base with the same failure. The first full run's lib test binary aborted before its summary (uma_driver coherent-window restore tests, Windows error 487); the totals are the `-p xcl --lib` re-run (2472 passed, 1 failed) plus the other targets of the full run (137 passed, 2 failed, 20 ignored). review: no blocking finding. All hunks read. The four flag/SFI0 bit pairs (64UAVs 1<<15/0x8, InnerCoverage 1<<10/0x400, ShadingRate 1<<24/0x8_0000, DerivativesInMeshAndAmpShaders 1<<29/0x100_0000) match the opcodes/conditions checked; scan runs after optimize() so dead/unreachable uses do not set flags (covered by negative test guards). Heap handles never enter self.bindings (handle_from_heap path), so the UAV count is static-only as the comment claims. "dx.op.sample." prefix cannot collide with sampleBias/sampleCmp (trailing-dot mismatch) and those are checked separately. Mesh primitive ShadingRate outputs deliberately excluded, vertex/pixel covered. Minor only: the scan computes both inner_cov and mesh_deriv for both stages while each stage consumes one; first-arg opcode convention (args.first()) matches how these dx.op calls are built elsewhere. I did not independently re-derive the DXC flag numbers beyond the tests' exact-SFI0 + disassembly-metadata + validate assertions. performance: a single linear scan over surviving call instructions at graphics-shader build time; negligible and not per-frame. Direct-DXIL cache entries retranslate once; HLSL path untouched. verdict: safe to merge hardware / tool and model: AMD Radeon RX 6650 XT, Windows 10.0.26300; Muse Spark 1.3 (via pi) ran the build and tests in a prepared trial-merge worktree and drafted the review/performance lines; Claude Sonnet 5.5 (Claude Code) prepared the merge worktrees, read every hunk of the diff, checked the test counts and that the PR's own tests ran and passed in the logs, edited this text and posted it. AI use: the two models above did all of this; the account owner did not read the diff or write this text. Claude Sonnet 5.5 read the whole diff; Muse Spark 1.3 only ran the commands and drafted lines. What was not done: no game run, NVIDIA or Intel GPU, or Linux.
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!2441
No description provided.