Repository navigation
fix(agc): write nothing for an empty register list - #6004
Conversation
sceAgcCbSetShRegistersDirect and the other register list writers threw on a count of 0 although the matching size functions report 0 words for it. PPSA05684 calls the writer with an empty list at its main menu and terminated. An empty list now writes no packet and returns the cursor, as its size says; a null buffer still throws. AI-assisted: yes
|
Measured on this branch (cf914b5, 238 commits behind main), default CMake build (CMAKE_BUILD_TYPE empty, so unoptimized), lavapipe not involved (command-buffer encoding only), CachyOS Linux 7.2.9,
I read the change: a count of 0 now returns Not checked: what the console returns for an empty list (the PR body says the same), the title run on PPSA05684, and other targets. AI-assisted: yes |
AI-assisted: yes
|
Thanks for measuring it. The null-buffer case is now covered: f991052 adds AI-assisted: yes |
|
Thanks, that closes the gap I noted. Re-run at f991052 as-is (merge base 2b7e3ce, not rebased onto current
AI-assisted: yes |
|
Checked on the PR merged onto current |
What
Agc::Command::WriteRegisters, behindsceAgcCbSetShRegistersDirect,sceAgcCbSetUcRegistersDirectand thesceAgcDcbSet{Cx,Sh,Uc}RegisterDirectwriters, threwempty register liston a count of 0, although the matching...GetSizefunctions already report 0 bytes for it (agc_register_command_testschecks that). PPSA05684 (Uncharted: Legacy of Thieves Collection) callssceAgcCbSetShRegistersDirectwith an empty list at its main menu and terminated withwhat(): sceAgcCbSetShRegistersDirect: empty register list.An empty list now writes no packet, leaves the buffer untouched and returns its cursor, as its size says; a null buffer still throws. No packet is the behaviour the size function implies; the console's own return value for an empty list is not measured.
Tested
main2b7e3ce: full ctest 1182 of 1182,tools/check_conventions.py --base origin/mainpasses.agc_register_command_testsnow writes an empty list through each writer into a sentinel-filled buffer and requires the returned pointer to be the cursor, the cursor unchanged and the sentinel intact. WithPacket.cppfrommainit fails withsceAgcCbSetShRegistersDirect: empty register list.mainplus feat(agc): implement image and sampler tables indexed at runtime offsets #757/feat(agc): implement image tables loaded through 64-bit pointers #758): the main menu no longer terminates on this call.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)