tests: add refusal and mutation tests for gfx1013_compute_clear #3684
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3684
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3682"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Ammmae0x on GitHub · 2026-12-01 01:22 UTC · original
Ammmae0x:tests/gfx1013-compute-clear→main· +1676 −0 · 5 files · 1 commits · merged 2026-12-01 03:12 UTCRefs #1149
Adds refusal and mutation tests for
x2w::replay_group_clear(src/gfx1013_compute_clear.cpp), with zero edits to existing files (5 new files only, +1676/−0; source andsrc/shader_compute_request.cppuntouched).tests/gfx1013_compute_clear_check.cpp: callsreplay_group_cleardirectly on syntheticreq_<key>.c67requests built in per-case temp directories (removed on every exit), with the root signature serialized byD3D12SerializeVersionedRootSignature. No GPU, no device, no dxc.exe. 5 valid programs (sorted/deduped clears, two descriptor tables, non-zero entry offset, prefetch/clause/waitcnt no-ops, descriptor invalidation followed by a valid rewrite) and 33 refusals, each pinning its exactstd::runtime_errorsubstring including the byte offset for loop refusals.tests/cmake/gfx1013_compute_clear.cmake: builds the check from the test plussrc/gfx1013_compute_clear.cppandsrc/shader_compute_request.cpp, linking onlyd3d12(both D3D12 entry points used live ind3d12.lib); registers one CTest test per case plusgfx1013_compute_clear_all, and 5WILL_FAIL TRUEconfigure-time copy mutations mirroringera_gpu_alias_open_base_control.tests/gfx1013_compute_clear_meta_check.py+tests/checks/python-linux/gfx1013_compute_clear.txt+docs/experiments/gfx1013-compute-clear.md: Linux contract audit plus a Python transliteration of the replay; 38 cases, 8/8 mutations killed (5 CMake controls + 3 model-only).Linux (head
c2cdfc84, baseorigin/maine8179e28):PASS: gfx1013 compute clear: 38 cases, 8/8 mutations killedrun_checks_parallel.py --from-dir tests/checks/python-linux: 80/80origin/mainda804b9cWindows Verification (
c2cdfc842307babd379fe8bdd69e4fe0cbe1fe0f)AI-assisted.
@lukaslw-lab on GitHub · 2026-12-01 02:30 UTC · original · approved these changes
Reviewed
c2cdfc84by reading the diff; not built or run.Verdict: approve. The cases and the five C++ controls reach the guards they name in
replay_group_clear. The three SHOULDs can follow later. No MUST.%TEMP%\gfx1013_compute_clear_<case>, removed in both the constructor and the destructor (tests/gfx1013_compute_clear_check.cpp:224-235). Underctest -j, three processes use the same directory:gfx1013_compute_clear_refuse_sa24_wrong,gfx1013_compute_clear_all, andgfx1013_compute_clear_sa24_mut, which runs that same case. So do dev and release runs at the same time. One process'sremove_allcan delete thereq_*.c67parts another is reading. That gives flaky failures, and aWILL_FAILcontrol could pass for the wrong reason. A per-process suffix (PID or a random tag) closes it.compute_key(tests/gfx1013_compute_clear_check.cpp:158-169) copies the request hash with the revision hard-coded as"x2w-startup-shader-29cs".read_compute_requestchecks the key, so the next compute revision bump makes all 38 cases fail on a key mismatch. CI never runs them, so nobody would notice.x2w::compute_request_keyis public (src/shader_compute_request.h:13), and the check already links that file. Calling it removes the copy.load_imm,mbcnt_hi_src,store_bin,tests/gfx1013_compute_clear_meta_check.py:234-238) are therefore checked only against the Python model. Their anchors exist insrc/gfx1013_compute_clear.cpp, so three more CMake controls like (a)–(e) would make "8/8 killed" true for the C++.Tests: 5 valid + 33 refusal cases prove the replay's accepted shapes and each pinned refusal message. The 5
*_mutcontrols prove the entry alignment,sa[24], thes_and_b32literal, store offset alignment and the empty-store guard are each needed. CI ran none of them at this head: the Windowsprfilter (CMakePresets.json) excludesgfx1013_compute_clear*, and Linux runs only the contract audit and model. The C++ evidence is the author's local dev + release run (44/44).