Skip to content

feat(agc-driver): prepare shader variants registration did not predict - #2731

Closed
XairRrR wants to merge 1 commit into
boykopovar:mainfrom
XairRrR:feat/agc-prepare-unpredicted-variants
Closed

XairRrR wants to merge 1 commit into
boykopovar:mainfrom
XairRrR:feat/agc-prepare-unpredicted-variants

Conversation

@XairRrR

@XairRrR XairRrR commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

What

PPSA05684 misses for its own pixel shaders, also after the fixed push slots of #2661 (main 197ffac, 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=128
Before #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 #1902 (comment).

SourceHandleFor and InvocationFor now 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. SourceHandleFor now also checks that the request refers to the registered code, as InvocationFor does. ARCHITECTURE.md describes the at-use path.

Tests: agc_driver_prepared_shaders and agc_driver_prepared_graphics now 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

  • Arch Linux (kernel 7.2.6), GCC 16.2.1, NVIDIA RTX 4070 Ti SUPER (driver 615.71.09), Release with BUILD_TESTING=ON.
  • Branch built alone; full ctest on main 57f96fd: 697/698; the one failure, agc_driver_dcc_keys_first_write, fails the same way on plain main 57f96fd. Conventions check passed.
  • Title: Uncharted: Legacy of Thieves Collection (PPSA05684), on its own bring-up branch.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

Registration prepares the variants a shader's registered state
predicts; a draw or dispatch whose state needs another one threw
"prepared shader artifact is missing for the requested static ABI".
Titles that link their own libSceAgc build that state themselves and
never call the driver's static ABI resolution, so their draws differ
from the registered prediction. The missing artifact is now prepared at use, logged, and kept
with the snapshot like the deferred and null pixel cases. SourceHandleFor
now checks that the request refers to the registered code, as
InvocationFor already did.

Uncharted: Legacy of Thieves Collection (PPSA05684) still misses on
main 197ffac (after the fixed push slots of boykopovar#2661) for its own pixel
shaders: "prepared shader artifact is missing for the requested static
ABI: address=85899411712 stage=5 wave=64 pushOffset=128
pushCapacity=128".
@github-actions github-actions Bot added the intake paused Closed while PR intake is limited to authors with at least 10 PRs merged into main label Oct 10, 2026
@github-actions

Copy link
Copy Markdown

Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

@github-actions github-actions Bot closed this Oct 10, 2026
@XairRrR

XairRrR commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #2917 (rebased on main; a closed PR can't be reopened after a force-push).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

intake paused Closed while PR intake is limited to authors with at least 10 PRs merged into main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant