Commit Graph

22 Commits

Author SHA1 Message Date
Adrià Franch acc0a0487d docs: describe shader modules and pipeline libraries built at registration
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-12 09:50:41 +02:00
Adrià 90933951d9
Merge pull request #419 from MichonGoddijn231849/feat/msaa-targets
feat(agc): multisampled color and depth targets with CB resolves
2026-10-12 00:01:37 +02:00
Adrià Franch 5c5912c49e fix(agc): guard a multisampled target's whole sample planes; docs for host-only multisampled targets
The guest-access guard covers CB bytes times samples (the single-sample layout size alone missed the later sample planes' tile padding), with a test row in that padding. Remove two TechnicalDebt lines duplicated by the rebase, document the guard bound and the unevicted targets, and add the multisampled targets to ARCHITECTURE.md.
2026-10-11 23:41:30 +02:00
Adrià Franch fdf8246f5e docs(architecture): describe APR and AMM command buffer queues 2026-10-11 19:56:25 +02:00
Alex Collini 687f73c951 fix(agc): select the registered back half for a fused hull header
sceAgcFuseShaderHalves returns a fused hull as a copy of its back half
(type 7) that is not registered: type 3, no user data, and shader
registers copied to scratch memory with the checksum, RSRC1/RSRC2 and
the LS program address rewritten. sceAgcCreatePrimState accepts only that
type-3 header, and graphics ABI resolution refused it as a replaced
shader header.

SameHeader now also takes a type-3 header as the registered type-7
header for the same code when every other field is equal and its shader
registers differ only in the fused ones. Graphics ABI resolution then
applies the bound header's shader registers over the registered state.

PPSA26344 fuses its hull halves during its loading screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 12:36:01 +02:00
Adrià Franch 8c619f16da docs(architecture): user-data callees; drop code comment
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 09:59:27 +02:00
Adrià Franch 250b617f14 docs: record the two-pass blend into 8_8 SWAP_ALT targets 2026-10-11 04:00:52 +02:00
Adrià 2cae6cc3cd
Merge pull request #2917 from XairRrR/feat/agc-prepare-unpredicted-variants
feat(agc-driver): prepare shader variants registration did not predict
2026-10-11 01:31:32 +02:00
Adrià Franch 946158a503 docs(architecture): describe the per-code header registry
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 01:04:50 +02:00
Sanjaysrinivas 982f7d7817 test(libkernel): cover cancellation recovery
Refs #1668. Complements #1141 with resource ownership and lifecycle regressions.
2026-10-10 21:27:49 +02:00
XairRrR 1232fd6cdf feat(agc-driver): prepare shader variants registration did not predict
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 197ffac9 (after the fixed push slots of #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".
2026-10-10 19:59:24 +02:00
Adrià Franch 8e73f6e73e perf(agc): relink library pipelines with link-time optimization in the background
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 14:24:45 +02:00
Adrià Franch 8c802e5eb1 perf(agc): give each graphics stage a fixed push constant slot with pipeline libraries
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 12:19:31 +02:00
Adrià Franch 0c20cab656 perf(agc): render with dynamic rendering when pipelines come from libraries
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 11:45:25 +02:00
Adrià Franch 0a04c8658c perf(agc): link graphics pipelines from per-stage libraries
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 11:25:23 +02:00
Adrià Franch 60251f9205 docs: describe LDS in device memory in ARCHITECTURE and TechnicalDebt
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 10:56:56 +02:00
Adrià Franch ac03a5b718 docs(architecture): describe background shader preparation at registration
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 09:52:20 +02:00
Adrià Franch 4120b2be0f docs(architecture): keep the recompiler stage notes under their diagram
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 03:16:29 +02:00
Sanjaysrinivas 140c46093c fix(shader): guard runtime MODE changes
Read MODE rounding fields from the declared initial mode. Accept only
constant writes that preserve it; diagnose unsupported runtime changes.
Document the supported contract and add decoder-to-recompiler regressions.

Refs #1668, #981
2026-10-10 03:16:25 +02:00
ebosido444-ai c48e01977d feat(shader): implement s_swappc_b64 fetch-shader call
Decodes SOP1 0x21 s_swappc_b64 (link pair = pc + 4) and resolves its call/return pairing through the existing s_setpc_b64 path: static call regions in GraphBuilder and the vertex-entry fetch-shader call inlined from the parsed fetch-shader plan. s_call_b64 (SOPK 0x16) and s_rfe_b64 (SOP1 0x22) throw at decode. Unmodeled cases throw; see docs/dev/TechnicalDebt.md.
2026-10-08 20:05:24 +02:00
Adrià Franch d3afdb02e2 docs(architecture): describe shader compilation at registration
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 19:47:03 +02:00
Adrià Franch fc00228938 docs: add architecture overview with Mermaid diagrams
Two diagrams in docs/dev/ARCHITECTURE.md: how the relinker and the NID-patched system libraries produce a native program, and the graphics path from command buffers through the shader recompiler to Vulkan. README only gains a link.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-04 11:20:38 +02:00