feat(agc): trace shader addresses for each draw #5238
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5238"
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-13T15:23:53Z.
What
Add opt-in
APS5_TRACE_DRAW_PROGRAMSper-draw diagnostics that print the selected shader stage and role with the code base and entry addresses, plus submission serial and queue. This lets investigators compare selected shader addresses against shader-preparation failure logs without implying the failures caused the black frames.Tested
agc_driver_draw_program_trace_testswith CMake/Ninja.ctest --test-dir /tmp/AnyPS5-5166-build --output-on-failure -R '^agc_driver_draw_program_trace$'passed (1/1).Draw.cppobject with Ninja.python3 tools/check_conventions.py --base upstream/mainpassed.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 MarcZX10 on 2026-10-13T15:47:58Z.
The Conventional Commit check initially caught the commit subject and PR title. Both are corrected now; the latest conventions check passes. The path-filtered Linux, Windows, relinker, register-context and write-watch jobs are skipped for this diagnostic-only change.
Imported from boykopovar/AnyPS5. Originally posted by sktharunbalaji13-cmd on 2026-10-13T16:48:08Z.
Thank you @MarcZX100 for the per-draw shader-address tracing and for the CI and convention follow-up.
Your stage, role, code address, entry address, queue and submission fields complement our local investigation. They give a direct per-draw address comparison point for shader-selection decisions made at submission time.
Local update, uncommitted work only: we now have local draw-to-submission correlation covering draw attempts, shader-selection and preparation failures, recorded draw commands, and deduplicated draw-token sets associated with recorder batches. Submission attempts are distinguished from submit-confirmed events emitted after successful queue submission and recorder-state finalization.
Windows game-runtime validation has not been completed. Relevant object compilations and seven CaptureTrace utility tests passed, but the full PRX relink and AGC integration path remain blocked.
This does not claim that shader-preparation failures caused the black output. The cause remains unresolved.
Imported from boykopovar/AnyPS5. Originally posted by sktharunbalaji13-cmd on 2026-10-13T19:35:22Z.
Thank you for the per-draw shader-address tracing. We've now prepared a complementary contribution focused on connecting draw attempts and shader-preparation failures to actual recorded commands and the set of correlation tokens associated with each submitted recorder batch.
The clean-branch validation result for the new PR is: successful Windows configure, full instrumented
libSceAgcDriver.prxbuild with NID patching, and 8/8 passing CaptureTrace tests. No GPU/game-runtime validation was performed.The two diagnostic approaches complement each other: per-draw address information helps identify which shader program is selected, while the additional correlation data is intended to connect failures with recorded draw commands and queue-submission batches. We have not yet established that shader-preparation failures caused the black output; runtime validation remains necessary.
Related PR: https://github.com/boykopovar/AnyPS5/pull/5431
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T19:38:36Z.
Thanks for clarifying the complementary scope. I agree the address trace and draw-to-batch correlation answer different diagnostic questions. I checked #5431 as well: its current convention job fails on inline comments in
CaptureTrace.hppand the missing required PR-template headings, so I left those concrete findings there. Since both PRs touchDraw.cppand the AGC CMake target, I asked there how the implementations compose and whether they share or duplicate any instrumentation; that should make the integration boundary clear before either lands.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T11:35:55Z.
Checked the build,
agc_driver_draw_program_traceand the scoped ctest on the PR rebased onto main; the only failures (agc_recorder_kept_bytes,agc_driver_tessellation) fail identically without theDraw.cppchange.Added one commit:
docs/dev/BUILD.mdnow documentsAPS5_TRACE_DRAW_PROGRAMSnext to the otherAPS5_*diagnostics variables.Not verified here: the output on a real draw (the test covers the formatter only). Merging once CI is green.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T21:45:05Z.
Rebased onto current
main(only the#includeblock inDraw.cppconflicted; kept<cstdio>and<cstring>). Build and scoped ctest re-run:agc_driver_draw_program_tracepasses; the only failure,agc_driver_tessellation, also fails without theDraw.cppchange. Merging once CI is green.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T03:31:25Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAgcDriver/CMakeLists.txtL147core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cppL2core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cppL2