test(libSceAgc): find MRT0 through the compact versioned register defaults #7692
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7692"
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 PhialsBasement on 2026-10-19T00:22:09Z.
What
Follow-up to #7681, which made the versioned register-defaults tables hand out compact 12-byte type entries again (
RegisterDefaultsTypeLayout::Compact) and kept the legacysceAgcGetRegisterDefaultson 8-byte pairs. That PR dropped the MRT0 checks on the versioned tables when they stopped being pairs. This restores them for the compact layout and records which entry point hands out which layout. No production code changes.agc_commands,agc_initialization):colourTargetBlocktakes the entry size. MRT0 (key0x38e92c91) is block 78 through the legacy pairs and through the compactsceAgcGetRegisterDefaults2(13)table, block 73 of the compact version 10 table, and every versioned table from 4 to 13 holds it with the sixteen colour-target registers. #7681's first-entry checks (checkCompactTypes) stay as they are.docs/dev/debt/libSceAgc.md):sceAgcGetRegisterDefaults2,sceAgcGetRegisterDefaults2Internal,sceAgcGetRegisterDefaultsInternalandsceAgcInithand out the compact entries. SDK-built code walks the tables of the first two with a 12-byte stride, reads the key at +0 and the bank and index from the low 10 bits of the word at +4, and keeps an all-ones sentinel for a key it does not find. The legacy internal call's console layout is not known.Tested
Linux (CachyOS), AMD Radeon RX 9070 XT (RADV, Mesa 26.2.4), based on
mainb5be95ff0:agc_commands,agc_initializationandguest_shader_linkpass.sceAgcGetRegisterDefaults2handing out pairs for every version but 13,agc_commandsfails on the restored check ("MRT0 defaults key is missing, repeated or outside the context blocks"); with pairs for every version it fails first on #7681's "legacy register defaults reused the compact versioned table".tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.pyreports only this PR's earlier, conflicting revision.Windows and macOS: not built.
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 oneandonlydean on 2026-10-19T01:27:40Z.
Thanks. The layout split here (pairs for the legacy
sceAgcGetRegisterDefaults; compact 12-byte entries forsceAgcGetRegisterDefaults2,...2Internal,...InternalandsceAgcInit) is the same one #7681 merged asfea306dff7shortly before this PR was opened (RegisterDefaultsTypeLayout, defaultCompact). So main already hands the compact entries to these callers, and the production part of this PR now conflicts with identical behaviour.Two parts are still worth having as a small follow-up on top of #7681:
colourTargetBlockwith an entry-size parameter, checking MRT0 at block 78 and 73 through the compact v13 and v10 tables and walking versions 4-13. #7681 dropped those checks when the versioned tables stopped being pairs, so this would restore them for the new layout.docs/dev/debtlines don't name titles. A description such as "SDK-built code walks the tables of the first two with a 12-byte stride…" says what's needed without it.Could you rebase onto main, drop the production hunks, and keep the tests and the debt text on #7681's
RegisterDefaultsTypeLayout?Imported from boykopovar/AnyPS5. Originally posted by PhialsBasement on 2026-10-19T01:40:17Z.
Thanks, you're right that #7681 already does the split. Rebased onto
main(b5be95ff0), dropped all production hunks, and kept only:colourTargetBlockwith an entry-size parameter, checking MRT0 at block 78 (legacy pairs and compact v13), block 73 (compact v10), and walking versions 4 to 13 on #7681'sRegisterDefaultsTypeLayout.Title and description are updated to match.