shader: lower the exec-writing VOPC SDWA compares #3551

Manually merged
github merged 8 commits from github-bot/gh-3549 into gh-pr/3549/base 2026-11-30 09:03:40 +00:00 AGit
Owner

@⁠lambirou on GitHub · 2026-11-30 03:56 UTC · original
lambirou:shader/cmpx-sdwa → main · +335 −46 · 13 files · 8 commits · merged 2026-11-30 08:59 UTC

Refs #1790. Refs #932.

Lot 1b lowers the 62 exec-writing VOPC SDWA comparisons. VOPC SDWA encodes no destination and no dst_sel/dst_unused: the compare writes EXEC, so each form reuses the existing v_cmpx region opener unchanged (the s_mov_b64 s[a:b], exec save, the entry-mask intersection, the SKIP/else handling and the two closes). The non-SDWA path is untouched; cmpx_exec_save, open_cmpx_region and cmpx_save_pair only factor out logic the region opener already used.

Forms covered: 16 f32 predicates (whole-dword selections only, as their v_cmp forms), 16 f16 predicates, v_cmpx_class_f16, v_cmpx_class_f32, 8 i32, 8 u32, 6 i16 and 6 u16.

Coverage

  • 62/62 forms counted in both docs/coverage/gfx1013.tsv and docs/coverage/rdna2.tsv.
  • gfx1013: 1,542/1,968; gfx1030: 1,533/1,863; +62 in each reference over the previous measurement.
  • 194-entry WARP replay of pixel_aot_|compute_store_aot_ (no _hardware): 194 pass, 0 fail, 0 skip, 344.0 s.

Tests

  • draw-cmpx-sdwa passes on WARP and on the AMD Radeon RX 9060 XT (driver 32.0.32029.2010).
  • draw-cmpx-regions and draw-sdwa-cmp pass on WARP and hardware.
  • python -B tests/form_coverage_check.py passes; rdna2_tools_check.py reports 159 tests, 19 skips (LLVM_LIB absent).
  • docs_links_check.py: 181 Markdown files and 726 links; bidi_controls_check.py: 2,688 files; git diff --check: clean.

Limits

The worktree's CMake configure stops in the Opus dependency (LNK1104: m.lib), so the 194-entry run replayed the main build's CTest command list with this tree's tests and the main build's offscreen_check.exe; it is not a fresh ctest. The PR CI will configure normally and is the authoritative check. Byte/word selections on f32 predicates remain refused, as in lot 1a; 64-bit SDWA exec writers do not exist in the references.

The branch is based on red main 44a3ad5a. #3544 fixes the six pre-existing failures from #3472/#3471; until it lands, the Windows/Linux checks here can fail on those unrelated tests.

On the final head, the gfx1013 and Windows checks pass; the Linux check fails only on the pre-existing startup_triage_run reason fixed by #3544.

AI-assisted.

**@⁠lambirou** on GitHub · 2026-11-30 03:56 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3549) `lambirou:shader/cmpx-sdwa` → `main` · +335 −46 · 13 files · 8 commits · merged 2026-11-30 08:59 UTC Refs #1790. Refs #932. Lot 1b lowers the 62 exec-writing VOPC SDWA comparisons. VOPC SDWA encodes no destination and no `dst_sel`/`dst_unused`: the compare writes EXEC, so each form reuses the existing `v_cmpx` region opener unchanged (the `s_mov_b64 s[a:b], exec` save, the entry-mask intersection, the SKIP/else handling and the two closes). The non-SDWA path is untouched; `cmpx_exec_save`, `open_cmpx_region` and `cmpx_save_pair` only factor out logic the region opener already used. Forms covered: 16 f32 predicates (whole-dword selections only, as their `v_cmp` forms), 16 f16 predicates, `v_cmpx_class_f16`, `v_cmpx_class_f32`, 8 i32, 8 u32, 6 i16 and 6 u16. ## Coverage - 62/62 forms counted in both `docs/coverage/gfx1013.tsv` and `docs/coverage/rdna2.tsv`. - gfx1013: **1,542/1,968**; gfx1030: **1,533/1,863**; +62 in each reference over the previous measurement. - 194-entry WARP replay of `pixel_aot_|compute_store_aot_` (no `_hardware`): 194 pass, 0 fail, 0 skip, 344.0 s. ## Tests - `draw-cmpx-sdwa` passes on WARP and on the AMD Radeon RX 9060 XT (driver 32.0.32029.2010). - `draw-cmpx-regions` and `draw-sdwa-cmp` pass on WARP and hardware. - `python -B tests/form_coverage_check.py` passes; `rdna2_tools_check.py` reports 159 tests, 19 skips (LLVM_LIB absent). - `docs_links_check.py`: 181 Markdown files and 726 links; `bidi_controls_check.py`: 2,688 files; `git diff --check`: clean. ## Limits The worktree's CMake configure stops in the Opus dependency (`LNK1104: m.lib`), so the 194-entry run replayed the main build's CTest command list with this tree's tests and the main build's `offscreen_check.exe`; it is not a fresh `ctest`. The PR CI will configure normally and is the authoritative check. Byte/word selections on f32 predicates remain refused, as in lot 1a; 64-bit SDWA exec writers do not exist in the references. The branch is based on red `main` 44a3ad5a. #3544 fixes the six pre-existing failures from #3472/#3471; until it lands, the Windows/Linux checks here can fail on those unrelated tests. On the final head, the gfx1013 and Windows checks pass; the Linux check fails only on the pre-existing `startup_triage_run` reason fixed by #3544. AI-assisted.
Lower the 62 v_cmpx_*_sdwa forms of gfx1013/rdna2 in the pixel translator,
reusing the existing v_cmpx EXEC region opener. VOPC SDWA has no destination:
the comparison writes EXEC, so the non-SDWA path is unchanged.

Add draw-cmpx-sdwa (warp/hardware), the static controls and the coverage
assertions, and teach the scanner the new spellings.

Tests: draw-cmpx-sdwa warp/hardware, draw-cmpx-regions warp,
draw-sdwa-cmp warp, form_coverage_check, rdna2_tools_check.
Coverage: 62 of 62 forms in each reference; 1542/1968 gfx1013 and
1533/1863 gfx1030 in the 194-entry WARP replay.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 03:58:42 +00:00
case6 of startup_resource_retire_title releases the newer wrapper and calls settle() without waiting for the queues. Every release signals a release-time fence on each registered queue, and settle() only resubmits the drain list, so a fence that has not completed leaves both wrappers retained and the stage fails with retained=131072/2 against 65536/1. Sync the direct and gated queues before settle(), as #3457 did for startup_resource_retire. The expectation is unchanged.

Refs #3507
github-bot changed target branch from main to gh-pr/3549/base 2026-11-30 09:03:35 +00:00
github manually merged commit e1a6c0ab9a into gh-pr/3549/base 2026-11-30 09:03:39 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.