tests: record form coverage for eight merged compute_store_aot slices #2123

Merged
henriazz10 merged 2 commits from upstream-pr/2131 into main 2026-11-25 01:41:34 +00:00
henriazz10 commented 2026-11-25 01:14:50 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by henriazz10 on 2026-11-25T01:14:50Z.


Change

Refs #721. Record accepted instruction opcodes via FORM_COVERAGE_RECORD for eight merged compute_store_aot slices in tests/compute_store_check.py and wire their ENVIRONMENT properties in CMakeLists.txt:

  • draw-mbcnt (compute_store_aot_mbcnt_${adapter})
  • draw-bcnt-exec (compute_store_aot_bcnt_exec_${adapter})
  • draw-writelane (compute_store_aot_writelane_${adapter})
  • draw-ff1-exec (compute_store_aot_ff1_exec_${adapter})
  • draw-cvt-u32-f32 (compute_store_aot_cvt_u32_f32_${adapter})
  • draw-vadd_nc_i32 (compute_store_aot_vadd_nc_i32_${adapter})
  • draw-bfe (compute_store_aot_bfe_${adapter})
  • draw-salu_i32 (compute_store_aot_salu_i32_${adapter})

After each draw passes, the test writes the sorted first word of every non-empty line in the translated fixture to FORM_COVERAGE_RECORD.

Other compute_store_aot tests in main whose CTest entries still lack FORM_COVERAGE_RECORD (not modified here):

  • compute_store_aot_${adapter}
  • compute_store_aot_scratch_base_${adapter}
  • compute_store_aot_dpp_${adapter}
  • compute_store_aot_readlane_${adapter}
  • compute_store_aot_guard_read_${adapter}
  • compute_store_aot_f32_${adapter}
  • compute_store_aot_ff1_scalar_${adapter}
  • compute_store_aot_alu_minmax3_${adapter}
  • compute_store_aot_alu_med3_${adapter}
  • compute_store_aot_alu_xor3_${adapter}
  • compute_store_aot_alu_mad_i24_${adapter}
  • compute_store_aot_alu_cvt_pk_u8_${adapter}
  • compute_store_aot_salu_absdiff_${adapter}
  • compute_store_aot_gfx1013_image_store_${adapter}
  • compute_store_aot_lane_mask_${adapter}
  • compute_store_aot_mubuf_store_format_xyz_${adapter}
  • compute_store_aot_descriptor_store_format_${adapter}

Forms expected to turn green in tools/form_coverage.py from these six slices (when run under CTest with FORM_COVERAGE_RECORD):

  • v_mbcnt_lo_u32_b32, v_mbcnt_hi_u32_b32
  • s_bcnt1_i32_b32
  • v_writelane_b32
  • s_ff1_i32_b32, s_ff1_i32_b64
  • v_cvt_u32_f32_e32
  • v_add_nc_i32, v_sub_nc_i32

Verification

Commit f2697409, on 84ce2942. Windows 11 build 26300, DXC 10.0.26100.0, Python 3.12, debug layer enabled.

python -B tests/form_coverage_check.py
python -B tests/docs_links_check.py
python -B tests/bidi_controls_check.py
git diff --check HEAD~1

All four exited 0 (form coverage checks passed, Checked 18 Markdown files and 396 links., Checked 1428 tracked source, script and build/CI files: no bidirectional controls.).

Draws run with FORM_COVERAGE_RECORD set to a temporary file:

Draw Backend Result Recorded opcodes
draw-mbcnt WARP / RTX 5080 exit 0, compared_words=320 mismatches=0, debug_errors=0 buffer_store_dwordx3, s_endpgm, s_load_dwordx4, s_mov_b32, s_waitcnt, v_lshl_add_u32, v_mbcnt_hi_u32_b32, v_mbcnt_lo_u32_b32
draw-bcnt-exec WARP / RTX 5080 exit 0, compared_words=320 mismatches=0, debug_errors=0 buffer_store_dword, s_bcnt1_i32_b32, s_endpgm, s_load_dwordx4, s_mov_b32, s_waitcnt, v_lshl_add_u32, v_mad_u32_u24
draw-writelane WARP / RTX 5080 exit 0, compared_words=320 mismatches=0, debug_errors=0 buffer_store_dword, s_endpgm, s_load_dwordx4, s_mov_b32, s_waitcnt, v_add_nc_u32_e32, v_lshl_add_u32, v_writelane_b32
draw-ff1-exec WARP / RTX 5080 exit 0, compared_words=320 mismatches=0, debug_errors=0 buffer_store_dword, s_add_u32, s_endpgm, s_ff1_i32_b32, s_ff1_i32_b64, s_load_dwordx4, s_mov_b32, s_waitcnt, v_lshl_add_u32, v_mad_u32_u24
draw-cvt-u32-f32 WARP / RTX 5080 exit 0, compared_words=320 mismatches=0, debug_errors=0 buffer_store_dwordx4, s_endpgm, s_load_dwordx4, s_mov_b32, s_waitcnt, v_add_nc_u32_e32, v_cvt_u32_f32_e32, v_lshl_add_u32, v_mul_lo_u32
draw-vadd_nc_i32 WARP / RTX 5080 exit 0, compared_words=320 mismatches=0, debug_errors=0 buffer_store_dword, s_endpgm, s_load_dwordx4, s_mov_b32, s_waitcnt, v_add_nc_i32, v_lshl_add_u32, v_sub_nc_i32

Verification (commit a13f469b, on 08c8208f)

Each draw was run on WARP with FORM_COVERAGE_RECORD set to a temporary file. Every run exited 0 with mismatches=0. The records list these 14 forms:

Draw New forms in the record
draw-mbcnt v_mbcnt_lo_u32_b32, v_mbcnt_hi_u32_b32
draw-bcnt-exec s_bcnt1_i32_b32
draw-writelane v_writelane_b32
draw-ff1-exec s_ff1_i32_b32, s_ff1_i32_b64
draw-cvt-u32-f32 v_cvt_u32_f32_e32
draw-vadd_nc_i32 v_add_nc_i32, v_sub_nc_i32
draw-bfe s_bfe_u32, s_bfe_i32
draw-salu_i32 s_add_i32, s_sub_i32, s_abs_i32

python -B tests/form_coverage_check.py passes, and git diff --check is clean. The change only adds the record after each draw's existing checks, plus the CTest ENVIRONMENT property. No test logic changes.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

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:6594847373 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2131). Originally posted by [henriazz10](https://github.com/henriazz10) on 2026-11-25T01:14:50Z. --- ## Change Refs #721. Record accepted instruction opcodes via `FORM_COVERAGE_RECORD` for eight merged `compute_store_aot` slices in `tests/compute_store_check.py` and wire their `ENVIRONMENT` properties in `CMakeLists.txt`: - `draw-mbcnt` (`compute_store_aot_mbcnt_${adapter}`) - `draw-bcnt-exec` (`compute_store_aot_bcnt_exec_${adapter}`) - `draw-writelane` (`compute_store_aot_writelane_${adapter}`) - `draw-ff1-exec` (`compute_store_aot_ff1_exec_${adapter}`) - `draw-cvt-u32-f32` (`compute_store_aot_cvt_u32_f32_${adapter}`) - `draw-vadd_nc_i32` (`compute_store_aot_vadd_nc_i32_${adapter}`) - `draw-bfe` (`compute_store_aot_bfe_${adapter}`) - `draw-salu_i32` (`compute_store_aot_salu_i32_${adapter}`) After each draw passes, the test writes the sorted first word of every non-empty line in the translated fixture to `FORM_COVERAGE_RECORD`. Other `compute_store_aot` tests in `main` whose CTest entries still lack `FORM_COVERAGE_RECORD` (not modified here): - `compute_store_aot_${adapter}` - `compute_store_aot_scratch_base_${adapter}` - `compute_store_aot_dpp_${adapter}` - `compute_store_aot_readlane_${adapter}` - `compute_store_aot_guard_read_${adapter}` - `compute_store_aot_f32_${adapter}` - `compute_store_aot_ff1_scalar_${adapter}` - `compute_store_aot_alu_minmax3_${adapter}` - `compute_store_aot_alu_med3_${adapter}` - `compute_store_aot_alu_xor3_${adapter}` - `compute_store_aot_alu_mad_i24_${adapter}` - `compute_store_aot_alu_cvt_pk_u8_${adapter}` - `compute_store_aot_salu_absdiff_${adapter}` - `compute_store_aot_gfx1013_image_store_${adapter}` - `compute_store_aot_lane_mask_${adapter}` - `compute_store_aot_mubuf_store_format_xyz_${adapter}` - `compute_store_aot_descriptor_store_format_${adapter}` Forms expected to turn green in `tools/form_coverage.py` from these six slices (when run under CTest with `FORM_COVERAGE_RECORD`): - `v_mbcnt_lo_u32_b32`, `v_mbcnt_hi_u32_b32` - `s_bcnt1_i32_b32` - `v_writelane_b32` - `s_ff1_i32_b32`, `s_ff1_i32_b64` - `v_cvt_u32_f32_e32` - `v_add_nc_i32`, `v_sub_nc_i32` ## Verification Commit `f2697409`, on `84ce2942`. Windows 11 build 26300, DXC 10.0.26100.0, Python 3.12, debug layer enabled. ```powershell python -B tests/form_coverage_check.py python -B tests/docs_links_check.py python -B tests/bidi_controls_check.py git diff --check HEAD~1 ``` All four exited 0 (`form coverage checks passed`, `Checked 18 Markdown files and 396 links.`, `Checked 1428 tracked source, script and build/CI files: no bidirectional controls.`). Draws run with `FORM_COVERAGE_RECORD` set to a temporary file: | Draw | Backend | Result | Recorded opcodes | |---|---|---|---| | `draw-mbcnt` | WARP / RTX 5080 | exit 0, `compared_words=320 mismatches=0`, `debug_errors=0` | `buffer_store_dwordx3`, `s_endpgm`, `s_load_dwordx4`, `s_mov_b32`, `s_waitcnt`, `v_lshl_add_u32`, `v_mbcnt_hi_u32_b32`, `v_mbcnt_lo_u32_b32` | | `draw-bcnt-exec` | WARP / RTX 5080 | exit 0, `compared_words=320 mismatches=0`, `debug_errors=0` | `buffer_store_dword`, `s_bcnt1_i32_b32`, `s_endpgm`, `s_load_dwordx4`, `s_mov_b32`, `s_waitcnt`, `v_lshl_add_u32`, `v_mad_u32_u24` | | `draw-writelane` | WARP / RTX 5080 | exit 0, `compared_words=320 mismatches=0`, `debug_errors=0` | `buffer_store_dword`, `s_endpgm`, `s_load_dwordx4`, `s_mov_b32`, `s_waitcnt`, `v_add_nc_u32_e32`, `v_lshl_add_u32`, `v_writelane_b32` | | `draw-ff1-exec` | WARP / RTX 5080 | exit 0, `compared_words=320 mismatches=0`, `debug_errors=0` | `buffer_store_dword`, `s_add_u32`, `s_endpgm`, `s_ff1_i32_b32`, `s_ff1_i32_b64`, `s_load_dwordx4`, `s_mov_b32`, `s_waitcnt`, `v_lshl_add_u32`, `v_mad_u32_u24` | | `draw-cvt-u32-f32` | WARP / RTX 5080 | exit 0, `compared_words=320 mismatches=0`, `debug_errors=0` | `buffer_store_dwordx4`, `s_endpgm`, `s_load_dwordx4`, `s_mov_b32`, `s_waitcnt`, `v_add_nc_u32_e32`, `v_cvt_u32_f32_e32`, `v_lshl_add_u32`, `v_mul_lo_u32` | | `draw-vadd_nc_i32` | WARP / RTX 5080 | exit 0, `compared_words=320 mismatches=0`, `debug_errors=0` | `buffer_store_dword`, `s_endpgm`, `s_load_dwordx4`, `s_mov_b32`, `s_waitcnt`, `v_add_nc_i32`, `v_lshl_add_u32`, `v_sub_nc_i32` | ## Verification (commit `a13f469b`, on `08c8208f`) Each draw was run on WARP with `FORM_COVERAGE_RECORD` set to a temporary file. Every run exited 0 with `mismatches=0`. The records list these 14 forms: | Draw | New forms in the record | |---|---| | `draw-mbcnt` | `v_mbcnt_lo_u32_b32`, `v_mbcnt_hi_u32_b32` | | `draw-bcnt-exec` | `s_bcnt1_i32_b32` | | `draw-writelane` | `v_writelane_b32` | | `draw-ff1-exec` | `s_ff1_i32_b32`, `s_ff1_i32_b64` | | `draw-cvt-u32-f32` | `v_cvt_u32_f32_e32` | | `draw-vadd_nc_i32` | `v_add_nc_i32`, `v_sub_nc_i32` | | `draw-bfe` | `s_bfe_u32`, `s_bfe_i32` | | `draw-salu_i32` | `s_add_i32`, `s_sub_i32`, `s_abs_i32` | `python -B tests/form_coverage_check.py` passes, and `git diff --check` is clean. The change only adds the record after each draw's existing checks, plus the CTest `ENVIRONMENT` property. No test logic changes. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets. 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)
upstream-sync closed this pull request 2026-11-25 02:01:51 +00:00
R0Y00 commented 2026-11-25 02:02:07 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T01:36:49Z.


I resolved the CMake overlap with the merged add-with-carry fixture and kept its registration and coverage output. On Windows WARP all eight updated fixtures passed and produced separate, nonempty coverage records.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7149750999 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2131#issuecomment-7149750999). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T01:36:49Z. --- I resolved the CMake overlap with the merged add-with-carry fixture and kept its registration and coverage output. On Windows WARP all eight updated fixtures passed and produced separate, nonempty coverage records.
tedin7 commented 2026-11-25 03:01:00 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T02:04:53Z.

Review: COMMENTED


Review of head 6a76aa6d6f.

Result: 0 P1, 0 P2.

What I checked

  • The 8 new FORM_COVERAGE_RECORD blocks in tests/compute_store_check.py (mbcnt, bcnt_exec, writelane, ff1_exec, cvt_u32_f32, vadd_nc_i32, bfe, salu_i32) follow the same pattern as the existing record-mode tests. They run only after the readback and mutation checks pass, so only accepted programs are recorded.
  • CMakeLists.txt adds one ENVIRONMENT FORM_COVERAGE_RECORD=... per test, with unique names matching <build>/form_coverage/<test>.txt. Each of the 8 slices appears once.
  • Clean-room: only test harness and build wiring, no new ISA data or copied material.

Commands executed locally (Linux)

  • python3 -B tests/docs_links_check.py: Self-test passed, 398 links ok
  • python3 -B tests/bidi_controls_check.py: 1439 files, no bidi controls
  • git diff --check origin/main...HEAD: clean

Mutation (record logic)

  • Replaced line.split()[0] with line.split()[-1] in the record logic, applied to the 8 program lists and compared with docs/coverage/gfx1013.tsv. The real code yields 24 distinct mnemonics that match the reference. The mutant yields 1, so the mutation is detected by the coverage measurement.
  • Caveat: no CTest case fails on a wrong record. Coverage is only measured by tools/form_coverage.py. This is the same as the other record-mode tests, not a blocker.

Windows Server 2025 (WARP), x2w_pipe.py win2025 2131 --scope direct --targets offscreen_check --regex compute_store_aot_ --py-checks tests/form_coverage_check.py

  • Debug (--preset dev): 130/130 passed
  • Release /O2 (--preset release): 130/130 passed
  • tests/form_coverage_check.py: ok
  • GitHub CI Build and test on Windows: SUCCESS

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6050545960 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2131#pullrequestreview-6050545960). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T02:04:53Z. **Review:** COMMENTED --- Review of head 6a76aa6d6f52d52492c395971dffdeaa3ce6b2d1. Result: 0 P1, 0 P2. What I checked - The 8 new `FORM_COVERAGE_RECORD` blocks in `tests/compute_store_check.py` (mbcnt, bcnt_exec, writelane, ff1_exec, cvt_u32_f32, vadd_nc_i32, bfe, salu_i32) follow the same pattern as the existing record-mode tests. They run only after the readback and mutation checks pass, so only accepted programs are recorded. - `CMakeLists.txt` adds one `ENVIRONMENT FORM_COVERAGE_RECORD=...` per test, with unique names matching `<build>/form_coverage/<test>.txt`. Each of the 8 slices appears once. - Clean-room: only test harness and build wiring, no new ISA data or copied material. Commands executed locally (Linux) - `python3 -B tests/docs_links_check.py`: Self-test passed, 398 links ok - `python3 -B tests/bidi_controls_check.py`: 1439 files, no bidi controls - `git diff --check origin/main...HEAD`: clean Mutation (record logic) - Replaced `line.split()[0]` with `line.split()[-1]` in the record logic, applied to the 8 program lists and compared with `docs/coverage/gfx1013.tsv`. The real code yields 24 distinct mnemonics that match the reference. The mutant yields 1, so the mutation is detected by the coverage measurement. - Caveat: no CTest case fails on a wrong record. Coverage is only measured by `tools/form_coverage.py`. This is the same as the other record-mode tests, not a blocker. Windows Server 2025 (WARP), `x2w_pipe.py win2025 2131 --scope direct --targets offscreen_check --regex compute_store_aot_ --py-checks tests/form_coverage_check.py` - Debug (`--preset dev`): 130/130 passed - Release /O2 (`--preset release`): 130/130 passed - `tests/form_coverage_check.py`: ok - GitHub CI `Build and test on Windows`: SUCCESS 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!2123
No description provided.