Recompiler: export SV_Coverage from exp mrtz in direct DXIL pixel shaders #3252

Merged
Kalmarv merged 1 commit from upstream-pr/3252 into main 2026-12-02 17:39:56 +00:00
Kalmarv commented 2026-11-29 01:05:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-29T01:05:06Z.


What is in it
Exports SV_Coverage (SemKind::Coverage, system value 66) from exp mrtz (tgt == 8) channel 2 in the direct DXIL pixel shader lowerer (crates/xcl/src/gpu/dxil/lower_gfx.rs), matching the existing IR-path behavior (emit.rs). Handles both uncompressed (VSRC2) and compressed (VSRC1[15:0]) mrtz exports, lazily declares the SV_Coverage output signature element only when the pixel shader actually writes sample mask (preserving early-Z for shaders that do not), and default-initializes the mask to 0xFFFFFFFF if a path does not write it. Adds a unit + DXC-validation + GPU-draw test in crates/xcl/src/gpu/dxil/core_tests.rs.

Tested

  • cargo test -p xcl --lib direct_pixel_shader_exports_sv_coverage_from_mrtz passed (validates generated DXIL with DXC 1.9.2609.5 and executes a real D3D12 draw on NVIDIA GeForce RTX 5070 Ti comparing against HLSL reference for both mask = 0 and mask = 0xFFFFFFFF).
  • 150 s xcl-smoke regression run below on NVIDIA GeForce RTX 5070 Ti (0 device removals, 0 crashes).

Regression run
Baseline (main ancestor f0e8fdd5c3942ddd399d5ee11384c8595c5aacff):

xcl-smoke v1
commit: f0e8fdd5c3942ddd399d5ee11384c8595c5aacff
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 150
exit: 0x0
frames shown: 1695 (PresentX 1695)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 31546 MB

PR branch (638368431945303a576a8eea067f21767aa630f3):

xcl-smoke v1
commit: 638368431945303a576a8eea067f21767aa630f3
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 150
exit: 0x0
frames shown: 1739 (PresentX 1739)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 31718 MB

Not tested

  • Multi-sample (MSAA > 1x) partial bitmask values (e.g. 0b0101 on 4x MSAA) in a GPU render test; only 0x0 and 0xFFFFFFFF were verified on 1x RTV.
  • Titles other than ea3b5e4d.

AI use
Drafted, implemented, and tested with an AI coding agent; reviewed and verified by hand against DXC validation, GPU draw comparison, and 150 s smoke logs.

<!-- greyfinch-sync:ivall/xcl:issue:5546281516 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3252). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-29T01:05:06Z. --- **What is in it** Exports `SV_Coverage` (`SemKind::Coverage`, system value 66) from `exp mrtz` (`tgt == 8`) channel 2 in the direct DXIL pixel shader lowerer (`crates/xcl/src/gpu/dxil/lower_gfx.rs`), matching the existing IR-path behavior (`emit.rs`). Handles both uncompressed (`VSRC2`) and compressed (`VSRC1[15:0]`) `mrtz` exports, lazily declares the `SV_Coverage` output signature element only when the pixel shader actually writes sample mask (preserving early-Z for shaders that do not), and default-initializes the mask to `0xFFFFFFFF` if a path does not write it. Adds a unit + DXC-validation + GPU-draw test in `crates/xcl/src/gpu/dxil/core_tests.rs`. **Tested** - `cargo test -p xcl --lib direct_pixel_shader_exports_sv_coverage_from_mrtz` passed (validates generated DXIL with DXC `1.9.2609.5` and executes a real D3D12 draw on NVIDIA GeForce RTX 5070 Ti comparing against HLSL reference for both `mask = 0` and `mask = 0xFFFFFFFF`). - 150 s `xcl-smoke` regression run below on NVIDIA GeForce RTX 5070 Ti (`0` device removals, `0` crashes). **Regression run** Baseline (`main` ancestor `f0e8fdd5c3942ddd399d5ee11384c8595c5aacff`): ``` xcl-smoke v1 commit: f0e8fdd5c3942ddd399d5ee11384c8595c5aacff gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 150 exit: 0x0 frames shown: 1695 (PresentX 1695) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 31546 MB ``` PR branch (`638368431945303a576a8eea067f21767aa630f3`): ``` xcl-smoke v1 commit: 638368431945303a576a8eea067f21767aa630f3 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 150 exit: 0x0 frames shown: 1739 (PresentX 1739) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 31718 MB ``` **Not tested** - Multi-sample (`MSAA > 1x`) partial bitmask values (e.g. `0b0101` on 4x MSAA) in a GPU render test; only `0x0` and `0xFFFFFFFF` were verified on 1x RTV. - Titles other than `ea3b5e4d`. **AI use** Drafted, implemented, and tested with an AI coding agent; reviewed and verified by hand against DXC validation, GPU draw comparison, and 150 s smoke logs.
Aniseto commented 2026-11-29 12:09:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-29T12:09:16Z.


Ran the SV_Coverage direct-DXIL export test at ddcd7563 on an NVIDIA Blackwell desktop part:

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

XCL_ADAPTER=NVIDIA cargo test -p xcl --lib direct_pixel_shader_exports_sv_coverage_from_mrtz -- --test-threads=1
1 passed; 0 failed; 0 ignored; 0 measured; 2498 filtered out      (exit 0)

The test passes here: SV_Coverage is exported from exp mrtz in the direct DXIL pixel-shader path, with DXC validation and a real D3D12 draw. The thread already reports an RTX 5070 Ti run from the author; this adds an independent run on driver 32.0.16.2140. I did not repeat the smoke run.

Not tested: a retail title, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.

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

<!-- greyfinch-sync:ivall/xcl:comment:7255604967 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3252#issuecomment-7255604967). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-29T12:09:16Z. --- Ran the `SV_Coverage` direct-DXIL export test at `ddcd7563` on an NVIDIA Blackwell desktop part: Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2140 (621.40), Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build. ``` XCL_ADAPTER=NVIDIA cargo test -p xcl --lib direct_pixel_shader_exports_sv_coverage_from_mrtz -- --test-threads=1 1 passed; 0 failed; 0 ignored; 0 measured; 2498 filtered out (exit 0) ``` The test passes here: `SV_Coverage` is exported from `exp mrtz` in the direct DXIL pixel-shader path, with DXC validation and a real D3D12 draw. The thread already reports an RTX 5070 Ti run from the author; this adds an independent run on driver 32.0.16.2140. I did not repeat the smoke run. Not tested: a retail title, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
Foniass commented 2026-11-29 14:57:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-11-29T14:57:00Z.


merge-check
base: fa204595a488c60c6c5f905244f0172072c9c2a9
head: ddcd7563e7183f34f4debefde388b662e0eb18af
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2605 passed, 4 failed, 49 ignored; SKIPPED: 44; failing: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3 (driver E_OUTOFMEMORY at seeds 70/545/1019/1507; they fail on base on this machine too)
review: matches the HLSL path; no bug found. It conflicts with #3296 (SV_StencilRef, same lines in lower_gfx.rs), so whichever merges second needs a rebase that adds stencil_ref.is_none() to the dummy-target condition. The PR text has no full-suite counts and AI use names no model.
performance: 60 s smoke on the merged tree: 1587 frames (94.4 %), peak commit 17276 MB (101.8 %), no removal, no crash. The lower frame count is within run-to-run noise on this title.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti (driver 32.0.16.2114), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

Note: since this run the PR conflicts with main (3b6a91ed). The result above is for this head merged onto the base named above.

Merge-check run and written with Claude Code (Claude Opus 5.5): a test merge onto the base above, the full suite, and a 60 s scripts/smoke.ps1 run of a retail title against main on the same machine. The 4 fuzz_validate_and_gpu_* failures happen on main on this machine too.

<!-- greyfinch-sync:ivall/xcl:comment:7257701235 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3252#issuecomment-7257701235). Originally posted by [Foniass](https://github.com/Foniass) on 2026-11-29T14:57:00Z. --- ```text merge-check base: fa204595a488c60c6c5f905244f0172072c9c2a9 head: ddcd7563e7183f34f4debefde388b662e0eb18af merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2605 passed, 4 failed, 49 ignored; SKIPPED: 44; failing: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3 (driver E_OUTOFMEMORY at seeds 70/545/1019/1507; they fail on base on this machine too) review: matches the HLSL path; no bug found. It conflicts with #3296 (SV_StencilRef, same lines in lower_gfx.rs), so whichever merges second needs a rebase that adds stencil_ref.is_none() to the dummy-target condition. The PR text has no full-suite counts and AI use names no model. performance: 60 s smoke on the merged tree: 1587 frames (94.4 %), peak commit 17276 MB (101.8 %), no removal, no crash. The lower frame count is within run-to-run noise on this title. verdict: safe to merge hardware / tool and model: RTX 5070 Ti (driver 32.0.16.2114), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 ``` Note: since this run the PR conflicts with main (3b6a91ed). The result above is for this head merged onto the base named above. Merge-check run and written with Claude Code (Claude Opus 5.5): a test merge onto the base above, the full suite, and a 60 s `scripts/smoke.ps1` run of a retail title against main on the same machine. The 4 `fuzz_validate_and_gpu_*` failures happen on main on this machine too.
Aniseto commented 2026-11-29 15:42:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-29T15:42:41Z.


Re-ran the SV_Coverage export test at 63836843 after the head moved from ddcd7563; this is a new response in the same thread, not an edit of my earlier report: https://github.com/xcl-dev/xcl/pull/3252#issuecomment-7255604967

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

XCL_ADAPTER=NVIDIA cargo test -p xcl --lib direct_pixel_shader_exports_sv_coverage_from_mrtz -- --test-threads=1
1 passed; 0 failed; 0 ignored; 0 measured; 2614 filtered out      (exit 0)

The test still passes at the new head: SV_Coverage is exported from exp mrtz in the direct DXIL pixel-shader path, with DXC validation and a real D3D12 draw. This adds the new head and driver 32.0.16.2140 as dimensions. Synthetic draw only, no title run.

Not tested: a retail title, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.

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

<!-- greyfinch-sync:ivall/xcl:comment:7258304950 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3252#issuecomment-7258304950). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-29T15:42:41Z. --- Re-ran the `SV_Coverage` export test at `63836843` after the head moved from `ddcd7563`; this is a new response in the same thread, not an edit of my earlier report: https://github.com/xcl-dev/xcl/pull/3252#issuecomment-7255604967 Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2140 (621.40), Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build. ``` XCL_ADAPTER=NVIDIA cargo test -p xcl --lib direct_pixel_shader_exports_sv_coverage_from_mrtz -- --test-threads=1 1 passed; 0 failed; 0 ignored; 0 measured; 2614 filtered out (exit 0) ``` The test still passes at the new head: `SV_Coverage` is exported from `exp mrtz` in the direct DXIL pixel-shader path, with DXC validation and a real D3D12 draw. This adds the new head and driver 32.0.16.2140 as dimensions. Synthetic draw only, no title run. Not tested: a retail title, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
Foniass commented 2026-12-01 06:43:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:43:38Z.


merge-check
base: d0832e614f
head: 6383684319
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2891 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: re-review (my earlier merge-check was on ddcd7563). Since then the PR was only rebased (fa204595 -> 24d21a41); the changed lines are identical. It changes the default direct DXIL path: a PS whose signature declares output 66 and writes mrtz channel 2 now outputs SV_Coverage (all ones by default, written only in active lanes), the dummy SV_Target7 always writes 0, and exp mrt7 no longer reaches it, a faithful copy of the HLSL path (emit.rs ~2418-2424, ~5601-5611); the compressed VSRC1[15:0] form matches Mesa's layout. Findings: (1) it conflicts with #3296 (SV_StencilRef), which edits the same any / dummy-target lines and mrtz arm; whichever merges second needs stencil_ref.is_none() in the dummy-target condition (lower_gfx.rs ~276). (2) #2358 is an older draft duplicate that no longer merges. (3) The compressed mrtz case is only checked through the signature, and the draw covers only masks 0 and all ones at 1x MSAA. (4) AI use names no model; Tested has no suite counts. Fine: the unit asserts fail on main without a GPU, the draw part goes through draw_ready() / skip_test, and nothing is #[ignore]d.
performance: 60 s smoke of a retail title, main d0832e61 vs this merge (d237bd56): 1516 -> 1457 frames shown (96 %; last presents per 2 s: 60 61 60), peak commit 18133 -> 16444 MB, 0 device removals, 0 crashes.
verdict: safe to merge (whichever of this and #3296 lands second needs stencil_ref.is_none() in the dummy-target condition; #2358 is an older duplicate)
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

AI-written and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7303201634 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3252#issuecomment-7303201634). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:43:38Z. --- merge-check base: d0832e614fa7d6ae027bb4feb27ccb9121f54a8f head: 638368431945303a576a8eea067f21767aa630f3 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2891 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none review: re-review (my earlier merge-check was on ddcd7563). Since then the PR was only rebased (fa204595 -> 24d21a41); the changed lines are identical. It changes the default direct DXIL path: a PS whose signature declares output 66 and writes mrtz channel 2 now outputs SV_Coverage (all ones by default, written only in active lanes), the dummy SV_Target7 always writes 0, and `exp mrt7` no longer reaches it, a faithful copy of the HLSL path (emit.rs ~2418-2424, ~5601-5611); the compressed `VSRC1[15:0]` form matches Mesa's layout. Findings: (1) it conflicts with #3296 (SV_StencilRef), which edits the same `any` / dummy-target lines and mrtz arm; whichever merges second needs `stencil_ref.is_none()` in the dummy-target condition (lower_gfx.rs ~276). (2) #2358 is an older draft duplicate that no longer merges. (3) The compressed mrtz case is only checked through the signature, and the draw covers only masks 0 and all ones at 1x MSAA. (4) AI use names no model; **Tested** has no suite counts. Fine: the unit asserts fail on main without a GPU, the draw part goes through `draw_ready()` / `skip_test`, and nothing is `#[ignore]`d. performance: 60 s smoke of a retail title, main d0832e61 vs this merge (d237bd56): 1516 -> 1457 frames shown (96 %; last presents per 2 s: 60 61 60), peak commit 18133 -> 16444 MB, 0 device removals, 0 crashes. verdict: safe to merge (whichever of this and #3296 lands second needs stencil_ref.is_none() in the dummy-target condition; #2358 is an older duplicate) hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 AI-written and posted by Foniass without a human check of each point.
cj-tomlin commented 2026-12-01 19:17:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by cj-tomlin on 2026-12-01T19:17:42Z.


merge-check claim
head: 6383684319

<!-- greyfinch-sync:ivall/xcl:comment:7322558706 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3252#issuecomment-7322558706). Originally posted by [cj-tomlin](https://github.com/cj-tomlin) on 2026-12-01T19:17:42Z. --- merge-check claim head: 638368431945303a576a8eea067f21767aa630f3
cj-tomlin commented 2026-12-01 19:23:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by cj-tomlin on 2026-12-01T19:23:08Z.


merge-check
base: 6bfb5c5153
head: 6383684319
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2904 passed, 1 failed, 51 ignored; SKIPPED: 27 (22 no wave64, 2 no heap windows, 3 no D3D12 debug layer / d3d12SDKLayers.dll); failing: gpu_two_pass_cache_e2e::two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs, which fails on the base too on this machine (6 of 6 runs alone on main 6bfb5c51 today); this PR does not touch that path. The new direct_pixel_shader_exports_sv_coverage_from_mrtz passes with its DXC validation and GPU draws (also with XCL_REQUIRE_GPU=wave64, so the draw part did not skip), and fails at its first signature assertion with main's lower_gfx.rs.
review: none blocking, after reading the whole diff (+130/-9, lower_gfx.rs, core_tests.rs). A PS whose signature declares output 66 now outputs SV_Coverage from exp mrtz channel 2 (VSRC2, or VSRC1[15:0] compressed), all ones until written, and declares it only when the shader writes the mask; the dummy SV_Target7 moves to the end of the shader and is added only when there is no target, no depth and no mask, always 0, so exp mrt7 no longer reaches it. That matches the HLSL path. It changes the default direct DXIL translation of such shaders. Not blocking: (1) it conflicts with open #3296 (SV_StencilRef) on the same lines: whichever lands second needs stencil_ref.is_none() in the dummy-target condition; (2) the draw covers masks 0 and all ones at 1x MSAA only, and the compressed form is checked through the signature only; (3) the PR's AI use names no model and Tested has no full-suite counts. Ran on NVIDIA (wave32) only: AMD's native wave64 path is not covered here, though the change is in signature and export handling, not in wave-size code.
performance: no measured run. By default one more temporary per PS and an SV_Coverage store only in shaders that write the mask; shaders that do not keep early-Z (reasoned).
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB, driver 621.40, AMD Ryzen 7 7800X3D, Windows 11 build 26300, debug build / Claude Code (Claude Opus 5.5) merged, built, ran the suite, read the diff and drafted this; I checked it.

<!-- greyfinch-sync:ivall/xcl:comment:7322730699 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3252#issuecomment-7322730699). Originally posted by [cj-tomlin](https://github.com/cj-tomlin) on 2026-12-01T19:23:08Z. --- merge-check base: 6bfb5c5153ccc23517daf30aa1071ddb0fadb53c head: 638368431945303a576a8eea067f21767aa630f3 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2904 passed, 1 failed, 51 ignored; SKIPPED: 27 (22 no wave64, 2 no heap windows, 3 no D3D12 debug layer / d3d12SDKLayers.dll); failing: `gpu_two_pass_cache_e2e::two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs`, which fails on the base too on this machine (6 of 6 runs alone on `main` `6bfb5c51` today); this PR does not touch that path. The new `direct_pixel_shader_exports_sv_coverage_from_mrtz` passes with its DXC validation and GPU draws (also with `XCL_REQUIRE_GPU=wave64`, so the draw part did not skip), and fails at its first signature assertion with `main`'s `lower_gfx.rs`. review: none blocking, after reading the whole diff (+130/-9, `lower_gfx.rs`, `core_tests.rs`). A PS whose signature declares output 66 now outputs `SV_Coverage` from `exp mrtz` channel 2 (`VSRC2`, or `VSRC1[15:0]` compressed), all ones until written, and declares it only when the shader writes the mask; the dummy `SV_Target7` moves to the end of the shader and is added only when there is no target, no depth and no mask, always 0, so `exp mrt7` no longer reaches it. That matches the HLSL path. It changes the default direct DXIL translation of such shaders. Not blocking: (1) it conflicts with open #3296 (SV_StencilRef) on the same lines: whichever lands second needs `stencil_ref.is_none()` in the dummy-target condition; (2) the draw covers masks 0 and all ones at 1x MSAA only, and the compressed form is checked through the signature only; (3) the PR's AI use names no model and Tested has no full-suite counts. Ran on NVIDIA (wave32) only: AMD's native wave64 path is not covered here, though the change is in signature and export handling, not in wave-size code. performance: no measured run. By default one more temporary per PS and an `SV_Coverage` store only in shaders that write the mask; shaders that do not keep early-Z (reasoned). verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB, driver 621.40, AMD Ryzen 7 7800X3D, Windows 11 build 26300, debug build / Claude Code (Claude Opus 5.5) merged, built, ran the suite, read the diff and drafted this; I checked it.
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!3252
No description provided.