feat(agc): replay prepared shader capture and materialization offline #5959
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5959"
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 fdfawef324 on 2026-10-14T17:09:05Z.
What
agc_shader_replay --preparecan succeed before the runtime descriptor capture and specialization that fail inside the game. Add--materializeto run the complete prepared-shader path on a saved request: prepare, match the invocation, capture its recorded inputs, then materialize the result. Failure output identifies the phase, and later requests still run. The new mode avoids a redundant preliminary resource-analysis pass.On the original base
e34c47921, an actual private capture reproduced the game's runtime image descriptor refusal in 0.266 seconds, versus reaching that refusal at 214.1 seconds in the game. On currentmainthe same request passes that check, and the tool stops at the next capture-phase refusal (unsupported buffer descriptor type) in 0.43 seconds. This measures iteration time for those faults; it does not measure a game-startup or FPS improvement. No game data or shader payload is included.Tested
main38d245448without conflicts. Windows Server 2025, MinGW GCC 15.2, CMake and Ninja Release withBUILD_TESTING=ON:agc_shader_replay,agc_shader_replay_requests_testsand their dependencies built at the rebased head.ctest -R agc_shader_replaypasses both tests (0.29 s and 0.44 s) withANYPS5_NO_SHADER_CACHE=1: legacy preparation succeeds on an active invalid descriptor; full replay rejects it at capture; an inactive invalid descriptor materializes; a valid later request still runs after a failure; and the new mode accepts the existing maintenance8 override.agc_shader_replay_toolfails against it.tools/check_test_registration.pyandgit diff --checkpass. Not run: full driver build, GPU execution, Linux, SPIRV-Tools configuration, or a title with this tool change.Checklist
main; no other open PR implements the same functionsCo-Authored-By: Codex [email protected]
Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-15T11:54:47Z.
Rebased onto
main38d245448(wase34c47921, 554 commits behind) without conflicts; the commit is unchanged apart from its base. At the new headee8460a1f,agc_shader_replayandagc_shader_replay_requests_testsbuild through CMake/Ninja Release (MinGW GCC 15.2) andctest -R agc_shader_replaypasses 2/2. The capture-skipping control still failsagc_shader_replay_tool. The description's Tested section and timing note now describe this head.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:12:19Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tools/ShaderReplay.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T12:23:04Z.
Checked on Linux (build + ctest of the AgcDriver scope): both new tests pass. On main,
agc_shader_replaydoesn't compile with SPIRV-Tools ON (SpirvTools::Disassemblecalled with aSharedSpirv), and this PR puts the target into ctest, so I added a one-line commit fixing it (result.spirv.data(), result.spirv.size()), rebased onto current main. Merging once CI is green.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T18:38:43Z.
Rebased onto current main (clean) and re-ran build + ctest of the AgcDriver scope: both new tests pass. The earlier Windows
guest_shader_linktimeout was a flake unrelated to this diff; the full Build on this head is green. Merging.