fix(gpu,shader): honor console sample masks (OMSetSampleMaskX) with guarded pipeline twins #419

Manually merged
github merged 2 commits from github-bot/gh-419 into gh-pr/419/base 2026-12-04 03:37:02 +00:00 AGit
Owner

@⁠Androtim on GitHub · 2026-12-04 02:51 UTC · original
Androtim:fix/console-sample-mask-lod-fade → main · +944 −17 · 10 files · 2 commits · merged 2026-12-04 03:32 UTC

Summary

Ports Wave 6C from \ReTerryDavis/ReVIctory\ PR #31\ (\4a783e4, \GPL-3.0) to honor the console command-list \OMSetSampleMaskX\ slot (142 / \

**@⁠Androtim** on GitHub · 2026-12-04 02:51 UTC · [original](https://github.com/Androtim/MiniVI/pull/419) `Androtim:fix/console-sample-mask-lod-fade` → `main` · +944 −17 · 10 files · 2 commits · merged 2026-12-04 03:32 UTC ## Summary Ports **Wave 6C** from \ReTerryDavis/ReVIctory\ PR \#31\ (\4a783e4\, \GPL-3.0\) to honor the console command-list \OMSetSampleMaskX\ slot (142 / \
Port ReTerryDavis/ReVIctory PR #31 (4a783e4, GPL-3.0) to MiniVI:

- Wire newer command-list slot 142 (0x470) OMSetSampleMaskX on both direct
  and thin command lists, with VICTORY_SAMPLE_MASK=0 opt-out.
- Lower masked pixel shaders (with_pixel_mask) to read the 2x2 quad coverage
  bits via USER_PIXEL_MASK (0x10a), discard excluded pixels at entry, clear
  EARLY_DEPTH_STENCIL, and bind SV_Position to the preceding vertex/mesh
  shader's output position row (position_row) when absent from the console
  signature.
- Lazily build guarded masked pipeline twins via Pending/make::ready without
  blocking the draw-submission thread, caching position_row on Translated so
  trimmed shader bytecode never needs a submission-thread reload and reloading
  trimmed masked bytecode via host_shader_masked.
- Keep plain shader-cache and PSO-library keys unchanged while keying masked
  translations and pipelines distinctly per position_row.
- Add shader and GPU unit tests covering quad-place/mask decoding, early-depth
  removal, cache key isolation, slot 142 / thin-list wiring, and synthetic
  vertex/mesh masked draws on hardware D3D12 and WARP.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 02:53:39 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-12-04 03:01 UTC · original

Triage (456ab3f8, CI check FAILURE):

  • Clean, zero-opt-in port of ReVIctory #31 (VICTORY_SAMPLE_MASK, default on with =0 kill-switch), but CI check failed on 1 unit test (977 passed; 1 failed):
    • list::thin::tests::bindings_record_no_work panicked at crates/victory-gpu/src/list/thin.rs:1621:9 (assertion left == right failed: uncategorized opcode, left: 45, right: 46).
  • Categorize the new OMSetSampleMaskX thin opcode in bindings_record_no_work so CI passes green, then proceed to Gate 2 Audit (#282) + Gate 3 GPU A/B + --features diagnostics LOD-fade PNGs.
**@⁠Androtim** on GitHub · 2026-12-04 03:01 UTC · [original](https://github.com/Androtim/MiniVI/pull/419#issuecomment-7399609788) Triage (`456ab3f8`, **CI `check` FAILURE**): - Clean, zero-opt-in port of `ReVIctory` `#31` (`VICTORY_SAMPLE_MASK`, default on with `=0` kill-switch), **but CI `check` failed on 1 unit test (`977 passed; 1 failed`):** - `list::thin::tests::bindings_record_no_work` panicked at `crates/victory-gpu/src/list/thin.rs:1621:9` (`assertion left == right failed: uncategorized opcode`, `left: 45, right: 46`). - Categorize the new `OMSetSampleMaskX` thin opcode in `bindings_record_no_work` so CI passes green, then proceed to Gate 2 Audit (`#282`) + Gate 3 GPU A/B + `--features diagnostics` LOD-fade PNGs.
github-bot force-pushed github-bot/gh-419 from 699875605a to 6335b7facd 2026-12-04 03:15:35 +00:00 Compare
github-bot changed target branch from main to gh-pr/419/base 2026-12-04 03:36:59 +00:00
github manually merged commit 6335b7facd into gh-pr/419/base 2026-12-04 03:37:02 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-12-04 03:31 UTC · original

Verified 6335b7fa categorized Plain::SAMPLE_MASK in thin::tests::bindings_record_no_work and CI check is PASS. Swapped label to triage: needs gpu test — awaiting Gate 2 Audit (#282) + Gate 3 GPU A/B & --features diagnostics LOD-fade PNGs.

**@⁠Androtim** on GitHub · 2026-12-04 03:31 UTC · [original](https://github.com/Androtim/MiniVI/pull/419#issuecomment-7400177864) Verified `6335b7fa` categorized `Plain::SAMPLE_MASK` in `thin::tests::bindings_record_no_work` and **CI `check` is PASS**. Swapped label to `triage: needs gpu test` — awaiting Gate 2 Audit (`#282`) + Gate 3 GPU A/B & `--features diagnostics` LOD-fade PNGs.
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Androtim--MiniVI!419
No description provided.