tests: add refusal and mutation tests for gfx1013_sampled_pixel #3693
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!3693
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3691"
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 02:00 UTC · original
Ammmae0x:tests/gfx1013-sampled-pixel→main· +2224 −0 · 5 files · 1 commits · merged 2026-12-01 03:12 UTCRefs #1149
Direct unit and mutation tests for
x2w::translate_gfx1013_sampled_pixel(src/gfx1013_sampled_pixel.cpp), with zero edits to existing files (5 new files only, +2224/-0; portable C++17 needing onlytests/gfx1013_sampled_pixel_check.cpp+src/gfx1013_sampled_pixel.cpp).tests/gfx1013_sampled_pixel_check.cpp: 57 cases, no-arg runs all, optional<case>arg, loudFAIL: <case>: ...with exit 1. 13 valid paths pinning exact hlsl and bindings (SampleLevel, Sample with mip filter 1 and 2, SampleBias at -4096, -128, 256 and 4093 with thebits[2] &= ~0x3fffusampler dedup, mask 15, sampler/resource reuse, dead scalar moves incl. s_movk/s_bfm_b32/s_mov_b64 literal and 128..208 branches, prefetch/clause/waitcnt no-ops, interpolation of xyzw, VOP2 sub/mad); 44 refusals pinning exact"<reason> at pixel byte <addr>"(every refusal the translator can throw, incl. all three primary-bias bounds, conflicting/incomplete descriptors, and the three s_mov_b64 pair refusals). Includes<initializer_list>, MSVC /W4 clean intent.tests/cmake/gfx1013_sampled_pixel.cmake: per-case tests +gfx1013_sampled_pixel_all+ 5 WILL_FAIL TRUE configure-time copy mutations mirroringera_gpu_alias_open_base_control(bias_range, secondary_bias, incomplete_descriptor, inverted_lod, after_final_export).tests/gfx1013_sampled_pixel_meta_check.py+tests/checks/python-linux/gfx1013_sampled_pixel.txt+docs/experiments/gfx1013-sampled-pixel.md: contract audit + compile & run the real C++ check withg++ -std=c++17on Linux + all 5 CMake mutations, plus a Python transliteration model with 8/8 mutations killed (5 CMake + 3 model-only: dedup, implicit_mip, dst_overflow).Linux (this host, base
origin/main1a9ccbc4):PASS: gfx1013 sampled pixel: 57 cases, 5/5 real C++ mutations killed, 8/8 model mutations killedrun_checks_parallel.py --from-dir tests/checks/python-linux: all 80 checks passedWindows Verification (
52c779f958a296623ffa367f66d794ea8a5b969e)AI-assisted.
@lukaslw-lab on GitHub · 2026-12-01 02:59 UTC · original · approved these changes
Reviewed
52c779f9by reading the diff; not built or run.Verdict: approve. The 57 cases reach every refusal the translator throws, and the five C++ controls each drop a real guard. The SHOULD can follow later. No MUST.
dedup,implicit_mip,dst_overflow,tests/gfx1013_sampled_pixel_meta_check.py:311-319) only change the Python transliteration. Their anchors are unique insrc/gfx1013_sampled_pixel.cpp(:161,:156,:170), and the meta check already compiles the other five mutants with g++ (:859). Applying these three to the real source the same way, or as CMake controls, would make "8/8 killed" a claim about the C++. It would also catch drift between the 898-line model and the translator.require/throwmessage insrc/gfx1013_sampled_pixel.cpp(36) is pinned by at least one refusal case, with theat pixel byte <addr>suffix.bits[2] &= ~0x3fffusampler dedup thatdeduptargets.Tests: the cases prove the accepted HLSL and each refusal substring, and the
*_mutcontrols prove the bias bounds, the secondary-bias, descriptor and LOD-order guards, and the final-export guard are each needed. CI at this head: Linux ran the meta check, which compiles and runs the real check and the five mutants with g++. The Windowsprfilter (CMakePresets.json) runs none of thegfx1013_sampled_pixel*tests, so the MSVC evidence is the author's dev + release run (63/63).github-bot referenced this pull request2026-12-01 03:06:43 +00:00