Recompiler: a PS sample mask from exp mrtz is written to SV_Coverage #1342

Merged
emirduran707 merged 1 commit from upstream-pr/1352 into main 2026-11-25 10:38:37 +00:00
emirduran707 commented 2026-11-24 15:08:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-24T15:08:42Z.


A pixel shader's exp mrtz was translated only for depth. A sample mask exported in it (z, enable bit 0x4) was dropped, and XclOut never declared SV_Coverage, so every covered sample was written. Mesa's emit_ps_mrtz_export (ac_nir_lower_ps_late.c) gives the layout: depth in x, stencil in y, sample mask in z for the 32-bit Z formats; for the compressed format, stencil in VSRC0 [31:16] and the mask in VSRC1.

When the output signature has SV_Coverage (system value 66) and an exp mrtz actually enables component 2, XclOut declares SV_Coverage, main initialises xo.xcl_mask = 0xFFFFFFFFu, and the mrtz export writes component 2 into it through exp_comp (so the compressed form gives VSRC1 & 0xFFFF; a mask fits in 16 bits). If the signature has SV_Coverage without an export writing it, SV_Coverage is not declared so samples are not zeroed out.

What is in it

  • crates/xcl/src/gpu/recomp/emit.rs: track ps_writes_mask on exp mrtz, declare SV_Coverage only when written, omit xcl_unused when SV_Coverage is the only output, and initialise xo.xcl_mask = 0xFFFFFFFFu.
  • crates/xcl/src/gpu/recomp/tests.rs: ps_mrtz_sample_mask_writes_sv_coverage, which compiles through DXC when present. It covers uncompressed and compressed exports, SV_Coverage in the signature without an mrtz mask write, a coverage-only PS, a PS without SV_Coverage, and a depth-only PS.

Tested

  • AMD Radeon RX 9060 XT (driver 32.0.31044.16), Ryzen 5 5600, Windows 11 Pro 26300, Rust 1.100.0; tests debug, smoke release
  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4 on 6dbae61 (rebased onto main 2aa2d1a): 1136 passed, 2 failed, 46 ignored; 8 SKIPPED (6 in lower_dxil::tests::{f16,f32}_programs_on_the_gpu; heap_window_out_of_memory_falls_back_to_the_switch_form; pso_measurement_compiles_an_exact_synthetic_record)
    • The 2 failures (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3) fail identically on unmodified main 2aa2d1a on this GPU (seeds 722 and 1599).
  • ps_mrtz_sample_mask_writes_sv_coverage failed before the ps_writes_mask / 0xFFFFFFFFu fix; passes after

Regression run

main:

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

this PR:

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

Not tested

  • The coverage output on the GPU (per-sample readback).
  • SV_StencilRef (y of the same export) is still not written: it needs PSSpecifiedStencilRefSupported, which XCL does not query yet, and declaring it unconditionally could stop pipelines on adapters without it.
  • NVIDIA and Intel GPUs.

AI use

  • Claude Code with Claude Opus 5.5: original change, test and description.
  • Antigravity with Gemini 4 Neon: addressed the unwritten-SV_Coverage review finding, extended the unit test, ran the updated test suite and smoke run, and updated this description.
  • Claude Code with Claude Opus 5.5: rebased the change onto main 2aa2d1a (a conflict in crates/xcl/src/gpu/recomp/emit.rs; main's new has_ps_vm field and this PR's ps_writes_mask both kept) and reran the suite and smoke runs above.
<!-- greyfinch-sync:ivall/xcl:issue:6584906826 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1352). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-24T15:08:42Z. --- A pixel shader's `exp mrtz` was translated only for depth. A sample mask exported in it (z, enable bit 0x4) was dropped, and `XclOut` never declared `SV_Coverage`, so every covered sample was written. Mesa's `emit_ps_mrtz_export` (`ac_nir_lower_ps_late.c`) gives the layout: depth in x, stencil in y, sample mask in z for the 32-bit Z formats; for the compressed format, stencil in VSRC0 [31:16] and the mask in VSRC1. When the output signature has `SV_Coverage` (system value 66) and an `exp mrtz` actually enables component 2, `XclOut` declares `SV_Coverage`, `main` initialises `xo.xcl_mask = 0xFFFFFFFFu`, and the mrtz export writes component 2 into it through `exp_comp` (so the compressed form gives `VSRC1 & 0xFFFF`; a mask fits in 16 bits). If the signature has `SV_Coverage` without an export writing it, `SV_Coverage` is not declared so samples are not zeroed out. **What is in it** - `crates/xcl/src/gpu/recomp/emit.rs`: track `ps_writes_mask` on `exp mrtz`, declare `SV_Coverage` only when written, omit `xcl_unused` when `SV_Coverage` is the only output, and initialise `xo.xcl_mask = 0xFFFFFFFFu`. - `crates/xcl/src/gpu/recomp/tests.rs`: `ps_mrtz_sample_mask_writes_sv_coverage`, which compiles through DXC when present. It covers uncompressed and compressed exports, `SV_Coverage` in the signature without an `mrtz` mask write, a coverage-only PS, a PS without `SV_Coverage`, and a depth-only PS. **Tested** - AMD Radeon RX 9060 XT (driver 32.0.31044.16), Ryzen 5 5600, Windows 11 Pro 26300, Rust 1.100.0; tests debug, smoke release - `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4` on 6dbae61 (rebased onto `main` `2aa2d1a`): 1136 passed, 2 failed, 46 ignored; 8 SKIPPED (6 in `lower_dxil::tests::{f16,f32}_programs_on_the_gpu`; `heap_window_out_of_memory_falls_back_to_the_switch_form`; `pso_measurement_compiles_an_exact_synthetic_record`) - The 2 failures (`gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`, `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3`) fail identically on unmodified `main` `2aa2d1a` on this GPU (seeds 722 and 1599). - `ps_mrtz_sample_mask_writes_sv_coverage` failed before the `ps_writes_mask` / `0xFFFFFFFFu` fix; passes after **Regression run** main: ``` xcl-smoke v1 commit: 2aa2d1a54396885bb5bfce8edef4285cf24803c2 gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1540 (PresentX 1540) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 20525 MB ``` this PR: ``` xcl-smoke v1 commit: 6dbae6165aae2832782a4ec0b3cbcd3d2dcd7c92 gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1558 (PresentX 1559) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 21354 MB ``` **Not tested** - The coverage output on the GPU (per-sample readback). - `SV_StencilRef` (y of the same export) is still not written: it needs `PSSpecifiedStencilRefSupported`, which XCL does not query yet, and declaring it unconditionally could stop pipelines on adapters without it. - NVIDIA and Intel GPUs. **AI use** - Claude Code with Claude Opus 5.5: original change, test and description. - Antigravity with Gemini 4 Neon: addressed the unwritten-`SV_Coverage` review finding, extended the unit test, ran the updated test suite and smoke run, and updated this description. - Claude Code with Claude Opus 5.5: rebased the change onto `main` `2aa2d1a` (a conflict in `crates/xcl/src/gpu/recomp/emit.rs`; main's new `has_ps_vm` field and this PR's `ps_writes_mask` both kept) and reran the suite and smoke runs above.
futurepro62 commented 2026-11-24 16:07:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T15:15:41Z.


Full-suite run, since this PR has no test report yet. Tested exact head 8bb3f12 (on its base 930e8b4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 752 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: ps_mrtz_sample_mask_writes_sv_coverage.
  • Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 752 passed, 0 failed, 41 ignored, no skips.

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:7135726619 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1352#issuecomment-7135726619). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T15:15:41Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `8bb3f12` (on its base `930e8b4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **752 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `ps_mrtz_sample_mask_writes_sv_coverage`. - Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **752 passed, 0 failed, 41 ignored**, no skips. **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.
DavidM1911 commented 2026-11-24 17:06:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T16:18:00Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (One run showed a single flaky failure / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7137437358 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1352#issuecomment-7137437358). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T16:18:00Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (One run showed a single flaky failure / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
kacper-serewis commented 2026-11-24 21:09:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by kacper-serewis on 2026-11-24T20:18:52Z.


Per-sample GPU readback for this PR, plus one case that fails on 8bb3f12: SV_Coverage in the signature but not written by the export drops every sample.

Tested: RTX 5070, driver 32.0.16.1656, Windows 11, debug. Wrong pixels out of 256:

case base 930e8b4 8bb3f12
mask in exp mrtz z, uncompressed 240 0
compressed (VSRC1) 240 0
uncompressed, coverage input also read 240 0
no SV_Coverage in the signature 0 0
SV_Coverage in the signature, mrtz EN=0x1 (mask channel not written) 0 256: no sample written

Cause of the last row: xcl_mask : SV_Coverage is declared whenever the signature has it, and XclOut xo = (XclOut)0 leaves it 0. Suggested: declare it only when a mask write is emitted, and start it at all ones, so a live path around the export keeps its samples:

+    ps_writes_mask: bool,            // in Em, initially false
@@ the mrtz export
                 if enabled(2) && ps.outputs.iter().any(|e| e.system_value == 66) {
+                    self.ps_writes_mask = true;
@@ the output struct
-                        66 => h.push_str("    uint xcl_mask : SV_Coverage;\n"),
+                        66 if self.ps_writes_mask => h.push_str("    uint xcl_mask : SV_Coverage;\n"),
-                if !ps.outputs.iter().any(|e| matches!(e.system_value, 64 | 65 | 67 | 68)) {
+                if !self.ps_writes_mask && !ps.outputs.iter().any(|e| matches!(e.system_value, 64 | 65 | 67 | 68)) {
@@ after `XclOut xo = (XclOut)0;` of the pixel main
+                if self.ps_writes_mask {
+                    h.push_str("    xo.xcl_mask = 0xFFFFFFFFu;\n");
+                }

With it on 8bb3f12 all five rows are 0. (The path around the export is not among the draws.)

Fixture: one full-target triangle into a 16x16 R8G8B8A8_UNORM target with 4 samples, cleared to 0. The PS exports 1.0 to target 0 and, through mrtz, a mask equal to the pixel's x (0-15), with -1 in the other mrtz sources. A compute shader reads each sample with Texture2DMS.Load and packs the written ones into a 4-bit mask per pixel. Expected: x in the three mask cases, 0xF in the other two. The full test is available on request.

Not tested: direct DXIL, native wave64 (this GPU has 32-lane waves only), AMD.

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment; the suggested change is adapted from one written with T3 Code (gpt-6.2-astra). I checked the points before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7143351713 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1352#issuecomment-7143351713). Originally posted by [kacper-serewis](https://github.com/kacper-serewis) on 2026-11-24T20:18:52Z. --- Per-sample GPU readback for this PR, plus one case that fails on `8bb3f12`: `SV_Coverage` in the signature but not written by the export drops every sample. **Tested:** RTX 5070, driver 32.0.16.1656, Windows 11, debug. Wrong pixels out of 256: | case | base `930e8b4` | `8bb3f12` | |---|---|---| | mask in `exp mrtz` z, uncompressed | 240 | 0 | | compressed (VSRC1) | 240 | 0 | | uncompressed, coverage input also read | 240 | 0 | | no `SV_Coverage` in the signature | 0 | 0 | | `SV_Coverage` in the signature, mrtz EN=0x1 (mask channel not written) | 0 | **256: no sample written** | Cause of the last row: `xcl_mask : SV_Coverage` is declared whenever the signature has it, and `XclOut xo = (XclOut)0` leaves it 0. Suggested: declare it only when a mask write is emitted, and start it at all ones, so a live path around the export keeps its samples: ```diff + ps_writes_mask: bool, // in Em, initially false @@ the mrtz export if enabled(2) && ps.outputs.iter().any(|e| e.system_value == 66) { + self.ps_writes_mask = true; @@ the output struct - 66 => h.push_str(" uint xcl_mask : SV_Coverage;\n"), + 66 if self.ps_writes_mask => h.push_str(" uint xcl_mask : SV_Coverage;\n"), - if !ps.outputs.iter().any(|e| matches!(e.system_value, 64 | 65 | 67 | 68)) { + if !self.ps_writes_mask && !ps.outputs.iter().any(|e| matches!(e.system_value, 64 | 65 | 67 | 68)) { @@ after `XclOut xo = (XclOut)0;` of the pixel main + if self.ps_writes_mask { + h.push_str(" xo.xcl_mask = 0xFFFFFFFFu;\n"); + } ``` With it on `8bb3f12` all five rows are 0. (The path around the export is not among the draws.) **Fixture:** one full-target triangle into a 16x16 R8G8B8A8_UNORM target with 4 samples, cleared to 0. The PS exports 1.0 to target 0 and, through mrtz, a mask equal to the pixel's x (0-15), with -1 in the other mrtz sources. A compute shader reads each sample with `Texture2DMS.Load` and packs the written ones into a 4-bit mask per pixel. Expected: x in the three mask cases, 0xF in the other two. The full test is available on request. **Not tested:** direct DXIL, native wave64 (this GPU has 32-lane waves only), AMD. **AI use:** Claude Code (Claude Opus 5.5) ran the tests and wrote this comment; the suggested change is adapted from one written with T3 Code (gpt-6.2-astra). I checked the points before posting.
emirduran707 commented 2026-11-24 21:30:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-24T21:21:23Z.


Fixed in 50f7106 (squashed and force-pushed), following your suggestion:

  • Em now tracks ps_writes_mask when an exp mrtz enables component 2 for an output signature containing SV_Coverage.
  • XclOut declares uint xcl_mask : SV_Coverage; only when ps_writes_mask is set (and skips xcl_unused when SV_Coverage is the only output).
  • main initialises xo.xcl_mask = 0xFFFFFFFFu; right after XclOut xo = (XclOut)0; so live paths that bypass the mrtz export keep their samples.

Extended ps_mrtz_sample_mask_writes_sv_coverage to check both the SV_Coverage-in-signature-without-write (EN=0x1) case and the 0xFFFFFFFFu default init; it compiles through DXC and passes, and the full workspace suite passes on 50f7106 (752 passed, 0 failed, 41 ignored).

AI use: Antigravity with Gemini 4 Neon applied the fix, extended the test, ran the suite/smoke, and wrote this reply.

<!-- greyfinch-sync:ivall/xcl:comment:7144820431 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1352#issuecomment-7144820431). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-24T21:21:23Z. --- Fixed in `50f7106` (squashed and force-pushed), following your suggestion: - `Em` now tracks `ps_writes_mask` when an `exp mrtz` enables component 2 for an output signature containing `SV_Coverage`. - `XclOut` declares `uint xcl_mask : SV_Coverage;` only when `ps_writes_mask` is set (and skips `xcl_unused` when `SV_Coverage` is the only output). - `main` initialises `xo.xcl_mask = 0xFFFFFFFFu;` right after `XclOut xo = (XclOut)0;` so live paths that bypass the `mrtz` export keep their samples. Extended `ps_mrtz_sample_mask_writes_sv_coverage` to check both the `SV_Coverage`-in-signature-without-write (`EN=0x1`) case and the `0xFFFFFFFFu` default init; it compiles through DXC and passes, and the full workspace suite passes on `50f7106` (752 passed, 0 failed, 41 ignored). **AI use:** Antigravity with Gemini 4 Neon applied the fix, extended the test, ran the suite/smoke, and wrote this reply.
JJAutoCompare commented 2026-11-25 03:05:52 +00:00 (Migrated from github.com)

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


Tested

I ran ps_mrtz_sample_mask_writes_sv_coverage on PR #1352 at clean detached head 6dbae6165aae2832782a4ec0b3cbcd3d2dcd7c92. The PR was open at that same head before and after the run.

git fetch --no-tags origin refs/pull/1352/head
git switch --detach 6dbae6165aae2832782a4ec0b3cbcd3d2dcd7c92
cargo test -j 2 -p xcl --lib gpu::recomp::tests::ps_mrtz_sample_mask_writes_sv_coverage -- --exact --nocapture

1 passed, 0 failed, 0 ignored, 0 skipped (1,114 filtered out, 0.15 s test time, Cargo exit 0). The test process logged that it loaded dxcompiler.dll and dxil.dll 1.9.2609.5 from XCL_DXC_DIR. The successful load enables the test's ps_6_6 compilation branch, and all six fixture translations completed and compiled successfully.

  • Uncompressed mrtz writes the mask from VSRC2 with EN=0x4. Compressed mrtz takes the low 16 bits of VSRC1 with EN=0xC. Both check the all-ones coverage default.
  • A coverage signature with an unwritten mask channel omits the coverage declaration and field. A mask export without a coverage signature also omits them.
  • The coverage-only signature emits SV_Coverage and omits the dummy target. The depth-only mrtz preserves the SV_Target0 and SV_Depth interface and writes depth from VSRC0, with no coverage field.

Windows 11 Enterprise Evaluation 26200.9974, Ryzen 7 3800X, Rust and Cargo 1.100.0 (x86_64-pc-windows-msvc), unoptimized test profile. Host inventory includes Intel Arc A770 with driver 32.0.101.9175. Process settings were XCL_ADAPTER=A770, XCL_DXC_DIR=%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64, CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0, CARGO_TARGET_DIR=L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target, and TEMP=TMP=L:/XclTooling/pr1352/temp.

Not tested

GPU execution, draw or per-sample coverage readback, direct DXIL translation, release builds, the full suite, and retail-title smoke runs.

AI use

T3 Code / Codex (gpt-6.2-sol) ran the test, checked the log and PR revision, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7151330482 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1352#issuecomment-7151330482). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T02:53:55Z. --- **Tested** I ran `ps_mrtz_sample_mask_writes_sv_coverage` on [PR #1352](https://github.com/xcl-dev/xcl/pull/1352) at clean detached head `6dbae6165aae2832782a4ec0b3cbcd3d2dcd7c92`. The PR was open at that same head before and after the run. ```powershell git fetch --no-tags origin refs/pull/1352/head git switch --detach 6dbae6165aae2832782a4ec0b3cbcd3d2dcd7c92 cargo test -j 2 -p xcl --lib gpu::recomp::tests::ps_mrtz_sample_mask_writes_sv_coverage -- --exact --nocapture ``` **1 passed, 0 failed, 0 ignored, 0 skipped** (1,114 filtered out, 0.15 s test time, Cargo exit 0). The test process logged that it loaded `dxcompiler.dll` and `dxil.dll` 1.9.2609.5 from `XCL_DXC_DIR`. The successful load enables the test's `ps_6_6` compilation branch, and all six fixture translations completed and compiled successfully. - Uncompressed `mrtz` writes the mask from `VSRC2` with `EN=0x4`. Compressed `mrtz` takes the low 16 bits of `VSRC1` with `EN=0xC`. Both check the all-ones coverage default. - A coverage signature with an unwritten mask channel omits the coverage declaration and field. A mask export without a coverage signature also omits them. - The coverage-only signature emits `SV_Coverage` and omits the dummy target. The depth-only `mrtz` preserves the `SV_Target0` and `SV_Depth` interface and writes depth from `VSRC0`, with no coverage field. Windows 11 Enterprise Evaluation 26200.9974, Ryzen 7 3800X, Rust and Cargo 1.100.0 (`x86_64-pc-windows-msvc`), unoptimized test profile. Host inventory includes Intel Arc A770 with driver 32.0.101.9175. Process settings were `XCL_ADAPTER=A770`, `XCL_DXC_DIR=%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64`, `CARGO_INCREMENTAL=0`, `CARGO_PROFILE_DEV_DEBUG=0`, `CARGO_PROFILE_TEST_DEBUG=0`, `CARGO_TARGET_DIR=L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target`, and `TEMP=TMP=L:/XclTooling/pr1352/temp`. **Not tested** GPU execution, draw or per-sample coverage readback, direct DXIL translation, release builds, the full suite, and retail-title smoke runs. **AI use** T3 Code / Codex (gpt-6.2-sol) ran the test, checked the log and PR revision, and wrote this report.
upstream-sync closed this pull request 2026-11-25 11:06:55 +00:00
thehollowedone commented 2026-11-25 11:09:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-25T10:25:28Z.


Independent Windows run on 6dbae61. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, DXC 1.8.2502.11.

cargo build --workspace --offline --locked -j 4 passed. cargo test --workspace --offline --locked --no-fail-fast -j 4 -- --nocapture --test-threads=4 finished with 1138 passed, 0 failed, 46 ignored, including 25 runtime skips in Cargo’s pass count.

I drew the translated shaders into a 4× MSAA target and read each sample separately with Texture2DMS.Load. On a 4×4 target, the uncompressed export wrote samples 0 and 2, and the compressed export wrote 1 and 3. A coverage signature with no mask write kept all four samples. A written zero mask suppressed all four. The case without a coverage signature kept all four, and a hand-written HLSL control produced the expected 0-and-2 pattern. All 384 sample reads matched. Removing the coverage signature from the uncompressed fixture while still expecting its mask made the check fail at sample 1, which was now written. The control edit was restored.

cargo test --offline --locked -j 4 -p xcl --lib local_mrtz_mask_reads_back_each_msaa_sample -- --nocapture --test-threads=1 passed 1 of 1 without skips. Synthetic native D3D12, using the HLSL translation path.

AI use: Codex (GPT-6, exact variant unspecified) wrote the scratch fixture, ran the tests and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7159675302 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1352#issuecomment-7159675302). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-25T10:25:28Z. --- Independent Windows run on [6dbae61](https://github.com/xcl-dev/xcl/commit/6dbae6165aae2832782a4ec0b3cbcd3d2dcd7c92). Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, DXC 1.8.2502.11. `cargo build --workspace --offline --locked -j 4` passed. `cargo test --workspace --offline --locked --no-fail-fast -j 4 -- --nocapture --test-threads=4` finished with **1138 passed, 0 failed, 46 ignored**, including 25 runtime skips in Cargo’s pass count. I drew the translated shaders into a 4× MSAA target and read each sample separately with `Texture2DMS.Load`. On a 4×4 target, the uncompressed export wrote samples 0 and 2, and the compressed export wrote 1 and 3. A coverage signature with no mask write kept all four samples. A written zero mask suppressed all four. The case without a coverage signature kept all four, and a hand-written HLSL control produced the expected 0-and-2 pattern. All 384 sample reads matched. Removing the coverage signature from the uncompressed fixture while still expecting its mask made the check fail at sample 1, which was now written. The control edit was restored. `cargo test --offline --locked -j 4 -p xcl --lib local_mrtz_mask_reads_back_each_msaa_sample -- --nocapture --test-threads=1` passed 1 of 1 without skips. Synthetic native D3D12, using the HLSL translation path. AI use: Codex (GPT-6, exact variant unspecified) wrote the scratch fixture, ran the tests and drafted this report.
DavidM1911 commented 2026-11-26 05:05:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:03:15Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7183138119 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1352#issuecomment-7183138119). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T05:03:15Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
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!1342
No description provided.