Repository navigation
test(agc): cover the draw-indirect, index-offset, instance count and index size packets - #11678
milescoviello wants to merge 2 commits into
Conversation
…index size packets Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…unchanged Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Pushed 60ee011. It applies the check MarcZX10 asked for on #11674: the refused-packet buffer is filled with a sentinel first, and after each refusal the test compares all 64 words and AI-assisted: yes (Claude Code) |
|
Windows 11 VM (GT 1030, NVIDIA 582.66, WinLibs GCC 15.2.0, Release, Ninja): this head AI-assisted: yes (Claude Code) |
|
Windows + NVIDIA result for head This PR's own tests: the libSceAgc packet tests Host: Windows 11 26300, Intel i7-12700K, NVIDIA GeForce RTX 2070 SUPER (vendor 0x10de, device 0x1e84; Vulkan loader 1.4.357 from the NVIDIA driver 621.01), Khronos Validation Layers nightly 1.4.366 (b2b44c0d37) through Same focused run on
The tree also carried the open PRs #11948, #12062, #12132, #12070, #11680, #11679, #11677, #11675, #11674, #11605, #11604, #11600, all merged cleanly, so the run is a joint one. Not run on a PS5. AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine. |
|
@maskym thanks for the Windows NVIDIA run with the validation layer. I've added it to Tested. AI-assisted: yes (Claude Code) |
What
tests/Commands.cppgets atestDrawPacketscase aftertestIndexBuffer. With modifier 0,sceAgcDcbDrawIndirectwrites a five-wordDRAW_INDIRECTwith the argument offset, both patch offsets at 0x280 and the auto-index initiator 2. Modifier bit 8 adds 0x20 to the initiator unless bit 32 is set.sceAgcDcbDrawIndexOffsetwrites a five-wordDRAW_INDEX_OFFSET_2whose first word is the index count, or 1 for a count of 0.sceAgcDcbSetNumInstanceswrites the two-wordNUM_INSTANCES.sceAgcDcbSetIndexSizewrites the index size and cache policy (bits 6-7) into the second word of its three-word packet, andsceAgcDcbSetIndexSize_0600adds the per-instance object id at bit 14. A misaligned argument offset, a modifier past 33 bits, an index size above 2, a cache policy above 3 and an object id above 1 are refused before anything is written, and the size getters report 20, 20, 8 and 12 bytes.It is called by all eight titles run here for
sceAgcDcbSetNumInstances; PPSA01494, PPSA03984, PPSA18194, PPSA30839, PPSA31162, PPSA34502 and PPSA36591 forsceAgcDcbDrawIndirect; PPSA01494, PPSA18194, PPSA21564, PPSA30839, PPSA31162, PPSA34502 and PPSA36591 forsceAgcDcbSetIndexSize_0600; PPSA01494, PPSA21564, PPSA30839, PPSA31162, PPSA34502 and PPSA36591 forsceAgcDcbDrawIndexOffset; PPSA03984 forsceAgcDcbSetIndexSize(call sites found through the import's PLT stub in each title's relinkedeboot.bin), and until now no test called it.Changed:
core/libs/prx/libSceAgc/tests/Commands.cpp. Test only, no change to the library.Tested
Linux (Ubuntu 26.04, GCC 15.2), Release:
cmake --build build --target agc_command_testsandctest -R '^agc_commands$' --repeat until-fail:3pass on this branch, which is currentmainplus the test.tools/check_conventions.py --base upstream/mainpasses.Windows 11 with an RTX 2070 SUPER (maskym's run, NVIDIA 621.01, Khronos validation layer, WinLibs GCC 15.2, Release): this PR's tests pass at head
60ee0115d0merged intomainf759e165d9, in a joint tree with other open PRs, and every otheragcandvideo_outtest gives the same result as onmain.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code