Skip to content

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

Merged
tedin7 merged 8 commits into
R0Y00:mainfrom
lambirou:shader/cmpx-sdwa
Nov 30, 2026
Merged

tedin7 merged 8 commits into
R0Y00:mainfrom
lambirou:shader/cmpx-sdwa

Conversation

@lambirou

@lambirou lambirou commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

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 44a3ad5. #3542 fixes the six pre-existing failures from #3470/#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 #3542.

AI-assisted.

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 R0Y00#3457 did for startup_resource_retire. The expectation is unchanged.

Refs R0Y00#3507
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.
@tedin7
tedin7 merged commit 8ad84f2 into R0Y00:main Nov 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants