fix(agc): return error for unsupported init versions #4835
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4835"
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 MarcZX10 on 2026-10-12T23:15:55Z.
What
Make
sceAgcInitreturnAGC_ERROR_INVALID_ARGUMENT(0x80890001) when its version argument is outside AnyPS5's register-default tables. Keep the existing version 13 support. Add regressions for unsupported versions and the pointer-valued argument observed in PPSA99011. Record that OpenAGC accepts only versions 0–12 while AnyPS5 has a version 13 table, so the retail upper limit remains unverified. A contributor also reports that Prospero Win (PPSA99995) progresses into its launcher loop with this change, while PS5 FSR4 Showcase (PPSA99011) fails at its ownvkCreateDevicecheck. Neither run establishes the console return value for an unsupported version.Tested
agc_command_tests;ctest --test-dir /tmp/AnyPS5-4808-build -R '^agc_initialization$' --output-on-failurepassed (1/1).-std=c++20 -Wall -Wextra -Werror -fsyntax-only.git diff --checkpassed.python3 tools/check_conventions.pyreports one unrelated existing finding:sceAgcDriverGetShaderDebuggingStatusinlibSceAgcDriver/Unimplemented.cppis documented under “Unknown function info,” while the checker expects a “Silent stubs” section. This PR does not change that export.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)Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-12T23:22:18Z.
Ran PS5 FSR4 Showcase (PPSA99011,
--trap-sdk-syscall-stubs) with this PR onmain90c68394(forktest/verify-agcinit688d056b; it merges clean), on Linux (GCC 13) and Windows 11 (WinLibs GCC 15.2):agc_initializationpasses 5/5 on both, no warnings inInit.cpportests/Commands.cpp.That matches its source. It's built on mpereiraesaa/ps5-vulkan, which calls
sceAgcInit(&state, sizeof(state))and returnsVK_ERROR_INITIALIZATION_FAILED(-3) for any non-zero result, after unloading module0x80000094. So with0x80890001the title fails cleanly where it used to throw.Whether it would get further on a console is still open. That port passes a pointer, while mihawk-99/PS5_Vulkan declares
sceAgcInit(uint32_t version)and its hardware notes record that call succeeding.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T02:44:13Z.
Closing:
0x80890001for an unknown version comes from OpenAGC and isn't measured, and with it PPSA99011 fails at its own check instead of the throw, so no title gets further. Reopen with what the console returns forsceAgcInit(&state, 8).Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-13T06:58:08Z.
One title does get further with this, which bears on the closing reason: Prospero Win (PPSA99995), the second title in #4808.
Windows 11 (26300), Radeon 860M, WinLibs GCC 15.2.0, Release. Head
cbd615bb4merged ontomain88107b7de, relinked with--windows, run for 60 s:mainit throwssceAgcInit: unsupported register defaults versionat start-up.apps=0is because its game library is empty here.PS5 FSR4 Showcase behaves as babyhuey reported: it fails at its own
vkCreateDevicecheck. The point about the error value stands, since0x80890001is OpenAGC's, not measured. I'm only adding that, with a non-throwing result, Prospero Win runs.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T08:11:52Z.
Thanks for the Prospero Win run. It materially changes the earlier statement that no title gets further: the reported run reaches its launcher loop with this change. I updated the description to include that result and the separate FSR4 Showcase result, while keeping the limitation clear: neither run establishes the console return value for an unsupported version. The exact error mapping therefore remains unverified.