tests: cover gfx1013 constant pixel shader decoding #3698
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!3698
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3696"
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:54 UTC · original
Ammmae0x:tests/gfx1013-pixel→main· +1478 −0 · 5 files · 1 commits · merged 2026-12-01 03:13 UTCRefs #1149
Portable C++17 unit, refusal, and mutation tests for
x2w::translate_gfx1013_constant_pixelandx2w::direct_gfx1013_constant_pixel(src/gfx1013_pixel.cpp).Only tests are added; the source is unchanged.
What landed — commit
a6ce20f9, 5 new files only, +1478/−0,zero edits to existing files:
tests/gfx1013_pixel_check.cpp: 136 cases (108 valid, 28refusals) calling both entry points directly. Valid cases pin
the exact HLSL string and the exact DXIL 1.0 module: every
inline integer 128..192, every negative inline integer
193..208, every inline float 240..247, twelve 32-bit literals
(including +inf, -inf, quiet/signalling NaN, -0.0), VGPR copy
chains and overwrites, and MRT0 exports selecting distinct,
repeated, reversed, and high-VGPR (v200..v203) channels.
Refusals pin all 6 exact error strings with byte offsets:
truncated program (1-byte, 1..3-byte tails, missing literal
dword, missing export sources dword), unsupported instruction
(bad opcode,
s_endpgmbefore export), expected finals_endpgm(bad opcode / move after export, trailing wordsafter
s_endpgm), unresolvedv_movsource (gaps 0..105,106..127, 209..239, 248..254, uninitialized VGPR copy),
uninitialized export VGPR (channels 0, 1, 3), and missing
final MRT0 export or
s_endpgm(including the empty program,which throws missing rather than truncated because the decoder
only reads a word when a byte remains).
tests/cmake/gfx1013_pixel.cmake: registersgfx1013_pixel_checkplus one CTest test per case and 5WILL_FAIL TRUEmutation controls (inline-int offset,inline-neg offset, inline-float table entry, VGPR-copy lower
bound,
s_endpgmtrailing-bytes check).tests/gfx1013_pixel_meta_check.py: audits the contract,compiles and runs the real C++ check with
g++ -std=c++17,compiles each CMake mutant the same way, and runs a Python
model mutation audit (3 extra model-only mutants: literal-255
branch, export opcode, uninitialized-export guard).
tests/checks/python-linux/gfx1013_pixel.txtanddocs/experiments/gfx1013-pixel.md.Linux verification (this host,
g++ -std=c++17):git diff --checkis clean. Windows execution (MSVC) awaitsWindows verification.
Windows Verification (
a6ce20f904750c15e9949e14820e0df23b5c244e)AI-assisted.
@R0Y00 on GitHub · 2026-12-01 03:11 UTC · original · approved these changes
Reviewed the synthetic constant-pixel decoder cases and their five mutation controls, including inline constants, register copies and trailing words.
ctest --test-dir <build> --no-tests=error -j1 -R '^gfx1013_pixel_' --output-on-failurepassed in the Windows integration.