feat(libSceAgc): implement sceAgcDcbSetIndexIndirectArgs #7696
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7696"
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?
Imported from boykopovar/AnyPS5. Originally posted by MaxLikesCode on 2026-10-19T00:54:40Z.
What
Implements
sceAgcDcbSetIndexIndirectArgsandsceAgcDcbSetIndexIndirectArgsGetSize, which threwNotImplemented_nid_no_patch.sceAgcDcbSetIndexIndirectArgs(buffer, attributeAddress, attributeIndex)writes a 4-dword INDEX_ATTRIBUTES_INDIRECT packet (opcode 0x91): header0xc0029100, the low and high dwords of the attribute address, and the attribute index. The size query returns 16 bytes.Where the behaviour comes from:
(cb, uint64_t address, uint32_t offset). Its encoding matches the measured bytes.BuildIndexAttributesIndirectwrites. The AnyPS5 driver already executes it, andtestIndexAttributesIndirectinagc_driver_pm4runs exactly this layout.The old declaration was
(buffer, uint32_t dataOffsetInBytes). The console reads a 64-bit address from the second argument, so the signature changes.The console clears the low four address bits and keeps the low 16 bits of the index. Here a nonzero address that is not 16-byte aligned, or an index above 0xffff, throws, as
sceAgcDcbSetIndexBufferalready throws for a misaligned address. A null address is written as 0, as on the console. Both points are recorded indocs/dev/debt/libSceAgc.md. The INDEX_ATTRIBUTES_INDIRECT entry indocs/dev/debt/libSceAgcDriver.mdsaid the packet was not measured on a PS5. It now says the console's builder writes it.tools/progress.pyonmainad502d717: libraries 3719/4065 (91.49%) before, 3721/4065 (91.54%) after.Tested
BUILD_TESTING=ONand the Windows CI configure flags, on this branch rebased onmaina373e85e5. There are no warnings in the changed files.agc_commandspasses with a new case. The packet for address0x1111111122222220and index0x4444equals the console's packet for its third pattern, whose address differs only in the low four bits the console clears. The size matches the packet, a null address writes 0, and a misaligned address and an index above 0xffff throw without writing. Changing the opcode, the alignment, the index mask or the size each makes the test fail.agc_driver_pm4passes.mainad502d717,agc_commands,agc_initializationandagc_driver_pm4pass again.python tools/select_tests.py ctest build --output-on-failure --timeout 120 --parallel 4: 1547 of 1548 pass.tools/check_skips.py --job windowsreports all 514 skips as expected. The one failure isagc_driver_bda_devicewithvkWaitForFences graphics: Vulkan result 2, which is #7584 onmain.python tools/check_conventions.py --base origin/mainpasses.python tools/pr_overlap.py --branchreports no open PR changing the same lines or exports.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
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T01:15:09Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/debt/libSceAgcDriver.mdL174-175Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
docs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T17:07:41Z.
Progress report (
ad502d7→5140b08)📈 System libraries: 91.54% (+0.05%, +2 implemented functions)
✅ 2 implemented
sceAgcDcbSetIndexIndirectArgssceAgcDcbSetIndexIndirectArgsGetSize⚪ 1 behaviourally empty (constant return or throw)
sceAgcDcbSetIndexIndirectArgsGetSizeImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-21T10:53:11Z.
Checked the packet (opcode 0x91, 4 dwords, size 16) against the prosper console oracle rows and OpenAGC's signature, the new test (fails on main, where this threw), and the debt entries; merged.