tests: cover guest shader container parser and identifiers #3701
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!3701
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3699"
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 03:08 UTC · original
Ammmae0x:tests/guest-shader-container→main· +2275 −0 · 5 files · 1 commits · merged 2026-12-02 02:08 UTCRefs #1149
Portable C++17 unit, refusal, and mutation tests for
read_guest_shader_container,native_shader_identifier,GuestShaderStage::physical_user_sgprandGuestShaderStage::full_precision_code(src/guest_shader_container.cpp), with zero edits to existing files (5 new files only, +2275/-0).What landed (commit
a8d65ef8):tests/guest_shader_container_check.cpp: 69 cases, linking only the check plussrc/guest_shader_container.cpp(the zlib streams are encoded as stored deflate blocks with an Adler-32 trailer directly in C++, so there is no external zlib dependency). 34 valid paths pin the exact parsed fields: the two V_NOP identifier halves, merged (+8) vs direct (+0) SGPR offsets, full-precision patching, vs/ps/ms/cs stages, HASH, PSV0 mesh stride (max vsthreads[0]fallback), ISGN/ISG1/OSGN/OSG1 signatures, XDAT tag 13 filtering,0xdeadbeefdeadbeefempty FSSM slots, resource/input arrays, and ps export patching (UINT32_MAX skipped, adjacent non-overlapping patches accepted). 35 refusals pin the exactstd::runtime_errormessages, including native stage size out of range for <16 bytes, >16MiB, and cumulative >64MiB.tests/cmake/guest_shader_container.cmake: registersguest_shader_container_checkplus 5 targeted WILL_FAIL TRUE copy mutations (sgpr_offset, identifier_offset, mesh_stride, xdat_tag, fssm_layout).tests/guest_shader_container_meta_check.py: compiles and runs the real C++ check withg++ -std=c++17and each CMake mutant copy (5/5 killed), cleaning temp dirs infinally.tests/checks/python-linux/guest_shader_container.txtanddocs/experiments/guest-shader-container.md.Verification (Linux, this host,
g++ 13.3.0):Caveat: no mingw on this host, so no Windows compile check; WIN-VERIFY run is the arbiter.
Windows Verification (
a8d65ef83d123d36eef792cd056bb754d28083f2)AI-assisted.