Commit Graph

13 Commits

Author SHA1 Message Date
MarcZX100 afcaf91019 test(agc): cover hand-built VGPR register offset 2026-10-11 13:32:20 +00:00
David 88cd5bbde5 fix(libSceAgc): accept a hand-built GE_USER_VGPR register offset in sceAgcCreatePrimState
EVO Player (PPSA99039), Jelly5 (PPSA99505), Emby5 (PPSA99515) and
Nuvio PS5 (PPSA99997) stop on main 0f863c10 with

  what():  sceAgcCreatePrimState: invalid user configuration register offsets

All four build their shader headers by hand (EVO-PLAYER-PS5
evo_agc_shader_header.c, ported from ps5-xash3d-halflife) and store the
ge_user_vgpr_en special at 0x25c (GE_USER_VGPR1, value 0) instead of
0x262 (GE_USER_VGPR_EN), as analysed in #3457. They run on the console.

OpenAGC's reconstruction of the FW 5.50 sceAgcCreatePrimState
(src/game_compat.c at 3c7e8072) copies the four special register pairs
verbatim without checking their offsets; KytyPS5's offset checks
(src/libs/agc.cpp at 16a7fe68) are EXIT_NOT_IMPLEMENTED guards. The
special is now copied at the offset the header stores, not moved to
0x262; the driver reads neither register. GE_CNTL, VGT_SHADER_STAGES_EN
and a used VGT_GS_OUT_PRIM_TYPE are still required at their own
offsets because the driver reads them there, and the error now names
the special and the offset found.

With the change all four titles get past sceAgcCreatePrimState and stop
in the shader recompiler (GetImageResource dword 3 is not a valid
runtime value), as #3457 reported for EVO Player.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit aeaa5080d9595305aa73e74d966f989c88b79839)
2026-10-11 13:19:03 +00:00
MarcZX100 a9575dc70b fix(agc): normalize disabled user VGPR special offset 2026-10-11 12:49:38 +00:00
ah 23443fb34d
fix(agc): prepare combined shader layouts when linking
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RPEHi56pUMbT1X4VZwStm9
2026-10-10 02:06:51 -05:00
Dean a7aa802c3e
Merge pull request #2293 from MichonGoddijn231849/fix/agc-prim-state-patch-hs
fix(agc): skip prim state preparation for a patch/hull mismatch
2026-10-10 17:46:48 +13:00
MarcZX100 89661f8f5d test(agc): isolate optional geometry register cases 2026-10-09 22:38:09 +00:00
MarcZX100 f8c237b1ac test(agc): cover missing hull output register 2026-10-09 22:38:09 +00:00
MarcZX100 e94f0c8f63 test(agc): verify optional geometry output register 2026-10-09 22:38:09 +00:00
MarcZX100 35c0baef20 fix(agc): accept unused geometry output register 2026-10-09 22:38:09 +00:00
Josip Parlov c90f85535e refactor(agc): name HV4j+E0MBHE sceAgcCreateInterpolantMapping_0100 2026-10-09 17:25:54 +02:00
Alex 270f375c82 fix(agc): skip prim state preparation for a patch/hull mismatch
sceAgcCreatePrimState only packs registers, but it now also resolves the
graphics ABI ahead of time, and that resolve throws when the primitive
type is a patch list without HS_EN or a hull stage with another type.
No draw can use such a state, so leave it to draw time and return the
registers. Bit 2 of VGT_SHADER_STAGES_EN is HS_EN, not an NGG bit.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-09 16:49:28 +02:00
boykopovar d21c4b737b fix(shader): publish prepared stage groups atomically + preserve snapshot lifetime 2026-10-08 17:28:31 +03:00
boykopovar 9a1783c043 fix(shader): prepare rectangle artifacts across separate helper calls 2026-10-08 17:27:59 +03:00