fix(agc): defer registered compute shaders without specials to dispatch #2627
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2627"
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 oneandonlydean on 2026-10-10T08:29:49Z.
Carrying @AlxcBTW's fix for #2580 while PR intake is paused. The change is theirs (from
AlxcBTW/AnyPS5:fix/agc-compute-without-specials-v2, d5655a45, the version rebased onto the deferred preparation inPlanRegistered).What
A registered compute shader whose header has no specials is still validated at registration, then deferred like the other shaders that can't be prepared there. It is prepared at its first dispatch, with the wave size from the initiator's
CS_W32_EN, whichDispatch.cppalready reads.Why
PPSA99005 (ps5-opengl showcase) stops when it registers its compute shaders:
A registered compute shader takes its wave size from its header's specials (
dispatch_modifier), and registration read them without a null check. ps5-opengl writes the specials pointer only for linked graphics stages and passes the compute wave size in the dispatch initiator instead (sceAgcCbDispatch(..., m->compute_wave_size == 32 ? 0x8000 : 0)).Tested
agc_driver_prepared_shaderscovers a header without specials deferred to dispatch and run as wave32 and wave64, while a header with specials and no artifact still throws. Without the change, registration throws.ready GL=4.6 (Core Profile) Mesa 26.2.0(the chain is in #2026).tools/check_conventions.pypasses, and the branch merges cleanly with currentmain.Fixes #2580
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 adriadam10 on 2026-10-10T08:53:26Z.
Checked on Linux: build +
prepared_shaders*ctest group green; the newRegistrationWithoutSpecialscase fails without theShaderRegistry.cppchange. Header with specials and no artifact still throws. Merging once CI is green.