tests: record form coverage for the remaining compute_store_aot draws #2160

Merged
henriazz10 merged 2 commits from upstream-pr/2168 into main 2026-11-25 04:13:43 +00:00
henriazz10 commented 2026-11-25 02:35:36 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by henriazz10 on 2026-11-25T02:35:36Z.


Record FORM_COVERAGE_RECORD in the remaining 18 compute_store_aot_*_${adapter} CTest entries and their underlying draw functions so tools/form_coverage.py counts the gfx1013 forms they already prove.

Tests updated (18)

  • compute_store_aot_${adapter} (tests/compute_store_check.py draw)
  • compute_store_aot_scratch_base_${adapter} (tests/compute_store_check.py draw-scratch-base-write)
  • compute_store_aot_dpp_${adapter} (tests/compute_store_check.py draw-dpp)
  • compute_store_aot_readlane_${adapter} (tests/compute_store_check.py draw-readlane)
  • compute_store_aot_guard_read_${adapter} (tests/compute_store_check.py draw-guard-read)
  • compute_store_aot_f32_${adapter} (tests/compute_store_check.py draw-f32)
  • compute_store_aot_ff1_scalar_${adapter} (tests/compute_store_check.py draw-ff1-scalar)
  • compute_store_aot_alu_minmax3_${adapter} (tests/compute_alu_minmax3_check.py draw)
  • compute_store_aot_alu_med3_${adapter} (tests/compute_alu_med3_check.py draw)
  • compute_store_aot_alu_xor3_${adapter} (tests/compute_alu_xor3_check.py draw)
  • compute_store_aot_alu_bcnt_${adapter} (tests/compute_alu_bcnt_check.py draw)
  • compute_store_aot_alu_mad_i24_${adapter} (tests/compute_alu_mad_i24_check.py draw)
  • compute_store_aot_alu_cvt_pk_u8_${adapter} (tests/compute_alu_cvt_pk_u8_check.py draw)
  • compute_store_aot_salu_absdiff_${adapter} (tests/compute_salu_absdiff_check.py draw)
  • compute_store_aot_gfx1013_image_store_${adapter} (tests/compute_mimg_float_store_check.py --draw)
  • compute_store_aot_lane_mask_${adapter} (tests/compute_lane_mask_check.py draw)
  • compute_store_aot_mubuf_store_format_xyz_${adapter} (tests/compute_store_check.py draw-mubuf-format-store-xyz)
  • compute_store_aot_descriptor_store_format_${adapter} (tests/compute_store_check.py draw-descriptor-store-format)

Per-draw verification (WARP and NVIDIA GeForce RTX 5080)

All 18 draws ran sequentially in the foreground with FORM_COVERAGE_RECORD set, exited 0, and wrote nonempty opcode records:

compute_store_aot warp exit=0 records=19
compute_store_aot_scratch_base warp exit=0 records=8
compute_store_aot_dpp warp exit=0 records=10
compute_store_aot_readlane warp exit=0 records=11
compute_store_aot_guard_read warp exit=0 records=33
compute_store_aot_f32 warp exit=0 records=20
compute_store_aot_ff1_scalar warp exit=0 records=9
compute_store_aot_alu_minmax3 warp exit=0 records=18
compute_store_aot_alu_med3 warp exit=0 records=19
compute_store_aot_alu_xor3 warp exit=0 records=18
compute_store_aot_alu_bcnt warp exit=0 records=18
compute_store_aot_alu_mad_i24 warp exit=0 records=15
compute_store_aot_alu_cvt_pk_u8 warp exit=0 records=20
compute_store_aot_salu_absdiff warp exit=0 records=14
compute_store_aot_gfx1013_image_store warp exit=0 records=8
compute_store_aot_lane_mask warp exit=0 records=9
compute_store_aot_mubuf_store_format_xyz warp exit=0 records=7
compute_store_aot_descriptor_store_format warp exit=0 records=17
compute_store_aot hardware exit=0 records=19
compute_store_aot_scratch_base hardware exit=0 records=8
compute_store_aot_dpp hardware exit=0 records=10
compute_store_aot_readlane hardware exit=0 records=11
compute_store_aot_guard_read hardware exit=0 records=33
compute_store_aot_f32 hardware exit=0 records=20
compute_store_aot_ff1_scalar hardware exit=0 records=9
compute_store_aot_alu_minmax3 hardware exit=0 records=18
compute_store_aot_alu_med3 hardware exit=0 records=19
compute_store_aot_alu_xor3 hardware exit=0 records=18
compute_store_aot_alu_bcnt hardware exit=0 records=18
compute_store_aot_alu_mad_i24 hardware exit=0 records=15
compute_store_aot_alu_cvt_pk_u8 hardware exit=0 records=20
compute_store_aot_salu_absdiff hardware exit=0 records=14
compute_store_aot_gfx1013_image_store hardware exit=0 records=8
compute_store_aot_lane_mask hardware exit=0 records=9
compute_store_aot_mubuf_store_format_xyz hardware exit=0 records=7
compute_store_aot_descriptor_store_format hardware exit=0 records=17

Newly covered gfx1013 forms (+6: 1253 -> 1259 of 1968)

  • MUBUF buffer_store_format_d16_xyz
  • SOP1 s_and_saveexec_b32
  • SOPP s_waitcnt_depctr
  • VOP3 v_cvt_pk_u8_f32
  • VOP3 v_mad_i32_i24
  • VOP3 v_readlane_b32

Checks

  • tests/form_coverage_check.py: exit 0
  • tests/docs_links_check.py: exit 0
  • tests/bidi_controls_check.py: exit 0
  • controls() on tests/compute_store_check.py and all 9 standalone test scripts: exit 0
  • LLVM 15 in Docker (tests/compute_store_check.py binary): binary_exit=0

AI-assisted. Gemini 4 Hydrogen (Antigravity CLI) wrote the change and ran the checks; Claude Code reviewed it.

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6595880434 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2168). Originally posted by [henriazz10](https://github.com/henriazz10) on 2026-11-25T02:35:36Z. --- Record `FORM_COVERAGE_RECORD` in the remaining 18 `compute_store_aot_*_${adapter}` CTest entries and their underlying draw functions so `tools/form_coverage.py` counts the gfx1013 forms they already prove. ### Tests updated (18) - `compute_store_aot_${adapter}` (`tests/compute_store_check.py` `draw`) - `compute_store_aot_scratch_base_${adapter}` (`tests/compute_store_check.py` `draw-scratch-base-write`) - `compute_store_aot_dpp_${adapter}` (`tests/compute_store_check.py` `draw-dpp`) - `compute_store_aot_readlane_${adapter}` (`tests/compute_store_check.py` `draw-readlane`) - `compute_store_aot_guard_read_${adapter}` (`tests/compute_store_check.py` `draw-guard-read`) - `compute_store_aot_f32_${adapter}` (`tests/compute_store_check.py` `draw-f32`) - `compute_store_aot_ff1_scalar_${adapter}` (`tests/compute_store_check.py` `draw-ff1-scalar`) - `compute_store_aot_alu_minmax3_${adapter}` (`tests/compute_alu_minmax3_check.py` `draw`) - `compute_store_aot_alu_med3_${adapter}` (`tests/compute_alu_med3_check.py` `draw`) - `compute_store_aot_alu_xor3_${adapter}` (`tests/compute_alu_xor3_check.py` `draw`) - `compute_store_aot_alu_bcnt_${adapter}` (`tests/compute_alu_bcnt_check.py` `draw`) - `compute_store_aot_alu_mad_i24_${adapter}` (`tests/compute_alu_mad_i24_check.py` `draw`) - `compute_store_aot_alu_cvt_pk_u8_${adapter}` (`tests/compute_alu_cvt_pk_u8_check.py` `draw`) - `compute_store_aot_salu_absdiff_${adapter}` (`tests/compute_salu_absdiff_check.py` `draw`) - `compute_store_aot_gfx1013_image_store_${adapter}` (`tests/compute_mimg_float_store_check.py` `--draw`) - `compute_store_aot_lane_mask_${adapter}` (`tests/compute_lane_mask_check.py` `draw`) - `compute_store_aot_mubuf_store_format_xyz_${adapter}` (`tests/compute_store_check.py` `draw-mubuf-format-store-xyz`) - `compute_store_aot_descriptor_store_format_${adapter}` (`tests/compute_store_check.py` `draw-descriptor-store-format`) ### Per-draw verification (WARP and NVIDIA GeForce RTX 5080) All 18 draws ran sequentially in the foreground with `FORM_COVERAGE_RECORD` set, exited 0, and wrote nonempty opcode records: ```text compute_store_aot warp exit=0 records=19 compute_store_aot_scratch_base warp exit=0 records=8 compute_store_aot_dpp warp exit=0 records=10 compute_store_aot_readlane warp exit=0 records=11 compute_store_aot_guard_read warp exit=0 records=33 compute_store_aot_f32 warp exit=0 records=20 compute_store_aot_ff1_scalar warp exit=0 records=9 compute_store_aot_alu_minmax3 warp exit=0 records=18 compute_store_aot_alu_med3 warp exit=0 records=19 compute_store_aot_alu_xor3 warp exit=0 records=18 compute_store_aot_alu_bcnt warp exit=0 records=18 compute_store_aot_alu_mad_i24 warp exit=0 records=15 compute_store_aot_alu_cvt_pk_u8 warp exit=0 records=20 compute_store_aot_salu_absdiff warp exit=0 records=14 compute_store_aot_gfx1013_image_store warp exit=0 records=8 compute_store_aot_lane_mask warp exit=0 records=9 compute_store_aot_mubuf_store_format_xyz warp exit=0 records=7 compute_store_aot_descriptor_store_format warp exit=0 records=17 ``` ```text compute_store_aot hardware exit=0 records=19 compute_store_aot_scratch_base hardware exit=0 records=8 compute_store_aot_dpp hardware exit=0 records=10 compute_store_aot_readlane hardware exit=0 records=11 compute_store_aot_guard_read hardware exit=0 records=33 compute_store_aot_f32 hardware exit=0 records=20 compute_store_aot_ff1_scalar hardware exit=0 records=9 compute_store_aot_alu_minmax3 hardware exit=0 records=18 compute_store_aot_alu_med3 hardware exit=0 records=19 compute_store_aot_alu_xor3 hardware exit=0 records=18 compute_store_aot_alu_bcnt hardware exit=0 records=18 compute_store_aot_alu_mad_i24 hardware exit=0 records=15 compute_store_aot_alu_cvt_pk_u8 hardware exit=0 records=20 compute_store_aot_salu_absdiff hardware exit=0 records=14 compute_store_aot_gfx1013_image_store hardware exit=0 records=8 compute_store_aot_lane_mask hardware exit=0 records=9 compute_store_aot_mubuf_store_format_xyz hardware exit=0 records=7 compute_store_aot_descriptor_store_format hardware exit=0 records=17 ``` ### Newly covered gfx1013 forms (+6: 1253 -> 1259 of 1968) - `MUBUF` `buffer_store_format_d16_xyz` - `SOP1` `s_and_saveexec_b32` - `SOPP` `s_waitcnt_depctr` - `VOP3` `v_cvt_pk_u8_f32` - `VOP3` `v_mad_i32_i24` - `VOP3` `v_readlane_b32` ### Checks - `tests/form_coverage_check.py`: exit 0 - `tests/docs_links_check.py`: exit 0 - `tests/bidi_controls_check.py`: exit 0 - `controls()` on `tests/compute_store_check.py` and all 9 standalone test scripts: exit 0 - LLVM 15 in Docker (`tests/compute_store_check.py binary`): `binary_exit=0` AI-assisted. Gemini 4 Hydrogen (Antigravity CLI) wrote the change and ran the checks; Claude Code reviewed it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
tedin7 commented 2026-11-25 04:04:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T03:16:27Z.

Review: COMMENTED


Review of head 53ef5d8dda (tests + CMake only, no product code).

Logic: each touched check writes the first word of every accepted program line to the file named by FORM_COVERAGE_RECORD, and CMake sets that variable per test, so tools/form_coverage.py can count these draws. Matches the existing pixel_* record convention. No ISA semantics change. Clean-room: no new reference material. No competing open PR covers these draws (#1566 is unrelated LDS lowering).

Findings: P1 0, P2 0.

  • Nit (P3): tests/compute_alu_bcnt_check.py records every non-blank line, so the label .LBB0_2: is written as an "opcode". The other checks filter lines ending in :. It shows up as a harmless entry in fixture_forms_not_in_reference. Suggest adding and not line.strip().endswith(":").

Verification (local Linux, in the PR worktree):

  • python3 tests/docs_links_check.py -> pass (401 links)
  • python3 tests/bidi_controls_check.py -> pass
  • git diff --check origin/main...HEAD -> clean
  • python3 -m py_compile tests/compute_*_check.py -> OK
  • Offline mutation of the record extraction (split()[0] -> split()[1]) on compute_alu_bcnt_check.LINES: records change from mnemonics to operands (s0,, vmcnt(0)). Note: this was checked offline against the program text; the draw tests need a GPU renderer, so no Linux test run flipped to failing.
  • python3 tests/form_coverage_check.py could not run on Linux (missing iced_x86 module).

Verification (Win2025 via the pipeline, Debug and Release -O2): the 36 compute_store_aot_* warp/hardware tests selected for the touched checks -> 36/36 passed. GitHub CI: Build and test on Windows = SUCCESS, Linux checks = SUCCESS, gfx1013 fixtures = SUCCESS.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6051333982 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2168#pullrequestreview-6051333982). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T03:16:27Z. **Review:** COMMENTED --- Review of head 53ef5d8dda30751e27a0e23b5cca952b1c390f14 (tests + CMake only, no product code). Logic: each touched check writes the first word of every accepted program line to the file named by FORM_COVERAGE_RECORD, and CMake sets that variable per test, so tools/form_coverage.py can count these draws. Matches the existing pixel_* record convention. No ISA semantics change. Clean-room: no new reference material. No competing open PR covers these draws (#1566 is unrelated LDS lowering). Findings: P1 0, P2 0. - Nit (P3): tests/compute_alu_bcnt_check.py records every non-blank line, so the label `.LBB0_2:` is written as an "opcode". The other checks filter lines ending in `:`. It shows up as a harmless entry in fixture_forms_not_in_reference. Suggest adding `and not line.strip().endswith(":")`. Verification (local Linux, in the PR worktree): - `python3 tests/docs_links_check.py` -> pass (401 links) - `python3 tests/bidi_controls_check.py` -> pass - `git diff --check origin/main...HEAD` -> clean - `python3 -m py_compile tests/compute_*_check.py` -> OK - Offline mutation of the record extraction (`split()[0]` -> `split()[1]`) on compute_alu_bcnt_check.LINES: records change from mnemonics to operands (`s0,`, `vmcnt(0)`). Note: this was checked offline against the program text; the draw tests need a GPU renderer, so no Linux test run flipped to failing. - `python3 tests/form_coverage_check.py` could not run on Linux (missing iced_x86 module). Verification (Win2025 via the pipeline, Debug and Release -O2): the 36 compute_store_aot_* warp/hardware tests selected for the touched checks -> 36/36 passed. GitHub CI: Build and test on Windows = SUCCESS, Linux checks = SUCCESS, gfx1013 fixtures = SUCCESS. AI-assisted; commands listed were executed locally.
upstream-sync closed this pull request 2026-11-25 05:04:43 +00:00
tedin7 commented 2026-11-25 05:04:43 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T04:28:01Z.

Review: COMMENTED


Review of head d5709fc96d

Scope: the PR adds a FORM_COVERAGE_RECORD writer to the remaining compute_store_aot draws and wires ENVIRONMENT in CMakeLists.txt; the new head also raises the timeout of compute_store_aot_guard_read_hardware to 180 s.

Findings

  • P3 (nit): 8 record writers (compute_alu_bcnt_check.py, compute_alu_cvt_pk_u8_check.py, compute_alu_mad_i24_check.py, compute_alu_med3_check.py, compute_alu_minmax3_check.py, compute_alu_xor3_check.py, compute_salu_absdiff_check.py, plus the ff1_scalar and dpp writers in compute_store_check.py) use line.split()[0] for line in LINES if line.strip() without the endswith(":") filter the other writers use. Labels are recorded as forms: the bcnt record contains .LBB0_2:. Coverage counts are unaffected (it only lands in fixture_forms_not_in_reference), but the filter should be the same everywhere.
  • No test in the PR checks the record content.

Win2025 (Debug, scoped to the touched tests, 141 tests): 140 pass, 1 fails: compute_store_aot_mac_f32_hardware, AssertionError: mac_f32: mutation 'fused mad() instead of unfused multiply+add' escaped detection. Not caused by this PR: this PR does not touch mac_f32_draw or its mutation list (the mutation is already on main at tests/compute_store_check.py:3351), and the assertion fires before any record code runs. It is the same equivalent-mutant failure already reported on #2164 (precise stops the fused form on the Basic Render Driver). It needs its own fix on main. Release /O2 was not reached (dev failed).

Linux, run locally on this head

  • python3 tests/docs_links_check.py: pass (18 files, 401 links)
  • python3 tests/bidi_controls_check.py: pass
  • git diff --check origin/main...HEAD: clean
  • python3 -m py_compile on every touched .py: pass
  • Mutation check on the record writer in compute_alu_bcnt_check.py, run through a stubbed renderer: baseline record gives 17 covered gfx1013 forms; dropping v_bcnt_u32_b32 from the record gives 16; skipping the record write fails with a missing file. Both mutants are detected; the checkout was restored afterwards.

Clean-room: only the repo's own fixtures and tools are used. CI Build and test on Windows was still pending when this was written.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6051861339 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2168#pullrequestreview-6051861339). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T04:28:01Z. **Review:** COMMENTED --- Review of head d5709fc96de4a4f120f514956514e3ebc1ec4b11 Scope: the PR adds a `FORM_COVERAGE_RECORD` writer to the remaining compute_store_aot draws and wires `ENVIRONMENT` in CMakeLists.txt; the new head also raises the timeout of `compute_store_aot_guard_read_hardware` to 180 s. Findings - P3 (nit): 8 record writers (`compute_alu_bcnt_check.py`, `compute_alu_cvt_pk_u8_check.py`, `compute_alu_mad_i24_check.py`, `compute_alu_med3_check.py`, `compute_alu_minmax3_check.py`, `compute_alu_xor3_check.py`, `compute_salu_absdiff_check.py`, plus the `ff1_scalar` and `dpp` writers in `compute_store_check.py`) use `line.split()[0] for line in LINES if line.strip()` without the `endswith(":")` filter the other writers use. Labels are recorded as forms: the bcnt record contains `.LBB0_2:`. Coverage counts are unaffected (it only lands in `fixture_forms_not_in_reference`), but the filter should be the same everywhere. - No test in the PR checks the record content. Win2025 (Debug, scoped to the touched tests, 141 tests): 140 pass, 1 fails: `compute_store_aot_mac_f32_hardware`, `AssertionError: mac_f32: mutation 'fused mad() instead of unfused multiply+add' escaped detection`. Not caused by this PR: this PR does not touch `mac_f32_draw` or its mutation list (the mutation is already on main at `tests/compute_store_check.py:3351`), and the assertion fires before any record code runs. It is the same equivalent-mutant failure already reported on #2164 (`precise` stops the fused form on the Basic Render Driver). It needs its own fix on main. Release /O2 was not reached (dev failed). Linux, run locally on this head - `python3 tests/docs_links_check.py`: pass (18 files, 401 links) - `python3 tests/bidi_controls_check.py`: pass - `git diff --check origin/main...HEAD`: clean - `python3 -m py_compile` on every touched .py: pass - Mutation check on the record writer in `compute_alu_bcnt_check.py`, run through a stubbed renderer: baseline record gives 17 covered gfx1013 forms; dropping `v_bcnt_u32_b32` from the record gives 16; skipping the record write fails with a missing file. Both mutants are detected; the checkout was restored afterwards. Clean-room: only the repo's own fixtures and tools are used. CI `Build and test on Windows` was still pending when this was written. AI-assisted; commands listed were executed locally.
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
R0Y00/Xbox2Windows!2160
No description provided.