feat(agc-driver): prepare shader variants registration did not predict #2917
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2917"
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 XairRrR on 2026-10-10T18:27:31Z.
What
PPSA05684 misses for its own pixel shaders, also after the fixed push slots of #2661 (main
197ffac9, the at-use path replaced by main's throw):AGC driver: prepared shader artifact is missing for the requested static ABI: address=85899411712 stage=5 wave=64 pushOffset=128 pushCapacity=128Before #2661 the same shaders missed with
pushOffset=20 pushCapacity=108. With this branch the title prepares 6 such pixel shader variants at use in its first 7 minutes and goes on.It links libSceAgc statically, so it builds the static ABI state itself and never calls the driver's
sceAgcDriverResolve*Abi; registration cannot predict every state its draws use. This follows up the question in https://github.com/boykopovar/AnyPS5/pull/1902#issuecomment-6080349495.SourceHandleForandInvocationFornow prepare any missing variant at use, like #1836's deferred shaders and #1902's null pixel program: the artifact is logged once (Shader 0x... stage N has no artifact prepared at registration for the state of this draw or dispatch; preparing it at use) and kept with the snapshot.SourceHandleFornow also checks that the request refers to the registered code, asInvocationFordoes. ARCHITECTURE.md describes the at-use path.Tests:
agc_driver_prepared_shadersandagc_driver_prepared_graphicsnow require an unpredicted dispatch or draw state to be prepared once and reused, and a dispatch registration did not predict to run (Registration); invalid requests still fail (misaligned push constants, code that is not the registered code, an invalid program).Tested
BUILD_TESTING=ON.57f96fd2: 697/698; the one failure,agc_driver_dcc_keys_first_write, fails the same way on plain main57f96fd2. Conventions check passed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by tv7 on 2026-10-10T18:51:09Z.
Tested on Marvel's Wolverine (PPSA03671), Windows 11, RTX 3070, GCC 15.2.0 UCRT Release.
Setup: main
1476f769+ #1940 + #757 + #2838 + this PR (1232fd6c) + #2922 for the longer message, plus local placeholders for 2 unnamed imports (AcmGTfJ64qFCPw, PadzBsgF0q8DIM).Without this PR (earlier run today: main
b69270dd+ #1940 + #757) the first presentation stopped at:AGC driver: prepared shader artifact is missing for the requested static ABI: address=0x11d015f100 stage=5 (Fragment) wave=64 push 128/128With this PR that shader is prepared at use and the run goes on:
So the next stop is the rect-list pair: vertex 0x11d00c3300 exports no parameters, while the at-use fragment variant reads parameter 0. I have not checked yet whether the registered fragment variant had the same input, i.e. whether this comes from the at-use path or from the rectangle path itself. Still 0 frames presented. Happy to rerun a revision.
Imported from boykopovar/AnyPS5. Originally posted by tv7 on 2026-10-10T19:09:27Z.
Follow-up: the stop after this PR is not from the at-use path. The registered variants of 0x11d015f100 read parameter 0 too, and the failing draw is an ordinary (non-rect) draw with vertex shader 0x11d00bd000, which exports no parameters. Details in #2975.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T23:31:29Z.
Checked on the PR merged onto current main:
agc_driver_prepared_shaders*andagc_driver_prepared_graphicspass (also--repeat until-fail:20), five of them fail when theShaderRegistry.cppchange is reverted, and the tests pin both the one-time preparation and the reuse of the artifact. The at-use path, the added registered-code check and the ARCHITECTURE.md entry look right; the confirmation on Wolverine from @tv7 covers a second title. Merging once CI is green.