Commit Graph
986 Commits
Author SHA1 Message Date
Adrià d8b60b46ed Merge pull request #13931 from liskeee/perf/agc-persistent-pipeline-cache-upstream
feat(agc): keep driver pipeline caches and costly compute pipeline binaries across updates
2026-11-01 15:22:44 +01:00
Adrià 75df21b76e Merge pull request #13678 from Gonic0/feat/agc-label-trap-aliased
perf(agc): trap label reads of small images inside pending large ones on macOS
2026-11-01 12:26:41 +01:00
Dean c1d62e8db2 Merge pull request #12797 from xXPBSXx/docs-agc-driver-status-queries
docs(agc): list the AgcDriver capture, trace and validation queries as silent stubs
2026-11-02 00:18:15 +13:00
liskeeeandClaude Opus 5.5 0c572f1c25 feat(agc): persist costly compute pipeline binaries
Capture costly compute builds and restore matching recipes after checking
full recipes, driver fingerprints and Vulkan compatibility keys. Add size
and time thresholds, opt-out, atomic persistence and corruption/rejection
fallback.

Remember below-threshold recipes in separate files so competing decisions
cannot overwrite captured binaries. Prefer saved binaries and retry
capture when the time threshold is lowered.

Cover compatibility, fallback, deterministic competing writers and
cross-process capture, restore and corruption.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 11:56:06 +01:00
Dean d2593327b5 Merge pull request #11447 from iamthehimansh/split/macos-agc-build
build(agc): compile Lifecycle, GuestMemory and GuestBufferMemory on macOS
2026-11-01 23:39:32 +13:00
Nicolas GonzalezandClaude Opus 5.5 a3046f449c perf(agc): trap label reads of small images inside pending large ones
The label read trap skipped every image sharing a page with another
pending image. Large tiled images are never stored at a label, so an
image inside one no longer counts as sharing. A store of an image over a
trapped one now stores the trapped one in the same flush, and an
eviction or explicit write-back stores the trapped images inside it
first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 03:38:15 -03:00
Nicolas GonzalezandClaude Opus 5.5 0fdd66d900 fix(agc): hold a label read trap until the store and skip aliased memory
The trap was released when FlushPending took the image out of the pending
registry, before it waited for GpuMutex, so a read in between saw the old
bytes; cache eviction and explicit write-backs did not release it at all.
Every store now releases it in writeBackLayers: after recording the GPU copy
into the import, or before the first CPU access on the CPU path, which also
releases the traps of other images on the same pages. A trapped image is
stored whole, and direct memory mapped at a second address is not trapped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 03:37:51 -03:00
Nicolas GonzalezandClaude Opus 5.5 2cf5b41ec8 perf(agc): trap CPU reads of label readbacks on macOS instead of storing them
Before a label, a pending linear or small storage image that shares no page
with another pending or storing image now gets a write-watch read trap
instead of its store. The first access to its pages stores it through the
host-read hook; any other store releases the trap first.
APS5_NO_LABEL_READ_TRAP=1 keeps the store at the label.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 03:37:51 -03:00
Romans Pokrovskis 2c1f59472a merge: refresh volume mip tests after registration split 2026-10-31 23:29:28 +02:00
Adrià e30f38577c Merge pull request #13691 from xXPBSXx/docs-agc-ps4-prt-2d-tiling
docs(agc): note that addrlib and fpPS4 take the 2D PRT modes from the whole coordinates
2026-10-31 20:09:56 +01:00
Adrià b8f0a6b202 Merge pull request #13667 from chitters2004/perf/prebuild-bound-programs
perf(agc): run first the library prebuilds of programs a submission binds
2026-10-31 12:52:52 +01:00
Adrià 3a6711d08b Merge pull request #13621 from beardsciences/fix/idle-store-yield
fix(agc): yield the queue-idle storage write-back to new work
2026-10-31 11:03:08 +01:00
xXPBSXxandClaude Sonnet 5.5 f33d726734 docs(agc): note that addrlib and fpPS4 take the 2D PRT modes from the whole coordinates
The PS4 tiling entry said pipe and bank of every PRT mode come from the coordinates inside the macro tile. It now says so for GB_TILE_MODE 11 and 16, and a new entry names the four 2D PRT modes (6, 7, 12, 17), where this code follows shadPS4 and AMD's addrlib and fpPS4 use the whole coordinates. Nothing is claimed about the console.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 23:55:20 +01:00
JamieandClaude Opus 5.5 01b6d04869 perf(agc): run first the library prebuilds of programs a submission binds
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 22:36:34 +00:00
Adrià f4b135b585 refactor(libSceAgcDriver): drop unused inventory header 2026-10-30 22:53:41 +01:00
Kyon 1dd9d2a8dc fix(libSceAgcDriver): drop unverified PaDebug routing 2026-10-30 22:53:35 +01:00
Kyon bd20995dba docs(libSceAgcDriver): preserve functional section spacing 2026-10-30 22:53:35 +01:00
Kyon d62f18a381 docs(libSceAgcDriver): avoid shared debt entry conflict 2026-10-30 22:53:35 +01:00
Kyon 55ee6860ed refactor(libSceAgcDriver): avoid shared build-list changes 2026-10-30 22:53:35 +01:00
Kyon 6427c96a88 feat(libSceAgcDriver): declare older PaDebug exports 2026-10-30 22:53:35 +01:00
Kyon 3242cb844f docs(libSceAgcDriver): isolate inventory section 2026-10-30 22:53:35 +01:00
Kyon 846482cad9 fix(libSceAgcDriver): exclude overlapping open exports 2026-10-30 22:53:35 +01:00
Kyon d9505003e2 docs(libSceAgcDriver): clarify export evidence 2026-10-30 22:53:35 +01:00
Kyon 3b359c7fdd feat(libSceAgcDriver): declare 22 callable exports 2026-10-30 22:53:35 +01:00
Adrià f5a171acc7 Merge pull request #13471 from BunnyFl/feat/libsceagcdriver-unavailable-calls
feat(libSceAgcDriver): return the retail errors of the unavailable driver calls
2026-10-30 22:29:05 +01:00
Adrià 7d9a2fc713 Merge pull request #13484 from xXPBSXx/docs-agc-ps4-gcn-sources
docs(agc): name what shadPS4, fpPS4 and addrlib do for PS4 layered surfaces and display buffers
2026-10-30 21:54:11 +01:00
Christian 859777b551 fix(agc): yield the queue-idle storage write-back to new work
Queue 0's idle store wrote every pending storage image back to guest memory
in one pass once the queues had been idle for 50 ms. In a title's movies
that is about 15 upscaled 3840x2176 targets (~0.5 GB) per pass, and the
title's next flip waited ~0.6 s behind it, about every 3 s.

The idle store now writes back 4 MiB at a time, in the block units the
images already track, and stops as soon as queue 0 has queued work or
another queue is running; the rest stays pending for the next idle period.
The quiet period is unchanged.
2026-10-30 16:38:03 -04:00
BunnyFlandClaude Opus 5.5 071f80c6ef docs(libSceAgcDriver): say the unavailable calls' answers come from disassembly
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 17:54:32 +01:00
BunnyFlandClaude Opus 5.5 d34913e943 feat(libSceAgcDriver): return the retail errors of the unavailable driver calls
Firmware 13.42 libSceAgcDriver.sprx answers sceAgcDriverAcquireRazorACQ,
GetPaDebugInterfaceVersion, SetHsOffchipParamDirect,
SubmitMultiCommandBuffersDirect, SubmitToRazorACQ and
SuspendPointSubmitDirect with 0x8A6D0001 and ModuleRegistration with
0x8A6D0003 for every input, like SetTargetRingForDiag.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 17:09:17 +01:00
mrfelek 17c3920ac4 perf(agc): keep a staged element in place when its frames are faster
Staging a swept write-only element (#7618) costs a copy-in and a
copy-back per use. In PPSA03912's town that saves GPU time, but in its
main menu the 202 MiB element is faster in place (73 vs 91 ms of GPU
time per frame), so the menu lost about a fifth of its frames.

Decide per element by measurement. The busiest element is probed in
its current mode, the other mode and its current mode again; the other
mode is kept when its frames are faster by more than twice the
standard error. A repeated answer doubles the wait for the next probe
from 20 s up to 160 s, and a jump of the frame GPU time by more than a
quarter (a scene change) probes again at once. The frame GPU time comes
from the whole-batch timestamps, which the first probe turns on.
Resource builds made under the other decision are not reused.
APS5_NO_ADAPTIVE_STAGING=1 stages every eligible element, as before.

The policy is in AdaptiveStaging.hpp, fed by the caller with frame
counts and time; agc_adaptive_staging covers keeping the faster mode,
frame noise, the back-off cap, a scene change and the share threshold.

AI-assisted. Tested by me on my own machine.
2026-10-30 16:38:05 +01:00
Adrià 6154580567 Merge pull request #12968 from GiannisG1/test/unclamped-blend-skip-without-formatless-reads
test(agc): skip the unclamped normalized blend test without shaderStorageImageReadWithoutFormat
2026-10-30 15:21:40 +01:00
xXPBSXxandClaude Sonnet 5.5 cd67746df8 docs(agc): name what shadPS4, fpPS4 and addrlib do for PS4 layered surfaces and display buffers
Two sentences in the PS4 layered surfaces and display buffers entries. AMD's address library and shadPS4 XOR the bank rotation of an array layer into the bank, which this code does since the layer rotation change, and fpPS4 adds it. shadPS4 rounds the width of a tiled display buffer up to 128 itself, whereas DisplayBufferSize requires the pitch to be a multiple of 128 already. Nothing is claimed about the console.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 14:24:56 +01:00
GiannisandClaude Opus 5.5 a98d4415b3 docs(agc): record that the unclamped normalized blend needs shaderStorageImageReadWithoutFormat
The pixel shader reads the color target through a storage image without
a format, so the recompiler refuses the shader on a device without
shaderStorageImageReadWithoutFormat. The sentence on unblended targets
goes, to keep the entry within the 1000-character limit. Asked for by
oneandonlydean in review.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 12:19:23 +01:00
Savvanis SpyrosandClaude Opus 5.5 adc96735c6 Merge main b7488e1ff5 into fix/agc-retire-overwritten-msaa
Keeps both sides of the debt doc: this branch's multisampled color
target entry and #6498's shader buffer entry. The test file merges with
both sides' test blocks. HostOnlySampleRanges from #12566 reads the
host-only flag from the range's TargetUse.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 12:09:06 +02:00
Adrià 664297cc2a Merge pull request #12983 from Oscar45397/fix/libSceAgcDriver-unnormalized-trunc-coord
fix(agc): accept TRUNC_COORD on unnormalized samplers
2026-10-30 10:19:58 +01:00
Adrià 712fc0e924 Merge pull request #12378 from BunnyFl/perf/write-watch-page-exclusion
perf(agc): exclude only an import's own pages from the write watch and settle partial-block imports in the background
2026-10-30 06:54:29 +01:00
Adrià 583b274e11 Merge pull request #12238 from XairRrR/fix/agc-sampled-depth-plane-reload
fix(agc): reload a sampled depth plane the guest wrote since its surface was bound
2026-10-30 06:32:54 +01:00
Dean 3d2d264392 Merge pull request #12916 from Tehshortbus/feat/multi-target-merge
feat(agc): merge a draw into more than one unclamped normalized color target
2026-10-30 16:49:46 +13:00
Adrià 0c9c5db748 Merge pull request #12690 from MarcZX10/feat/host-system-report
feat(agc): host system report and an actionable missing-Vulkan-feature message
2026-10-30 02:52:18 +01:00
Adrià 90c9759d12 Merge pull request #10581 from ashwin280802/fix/agc-single-sample-alpha-to-coverage
fix(agc): reject unmeasured single-sample dithered alpha-to-coverage
2026-10-30 02:45:21 +01:00
Himansh Raj 140c92d3b6 docs(agc): name the FS table titles only through #6160 2026-10-30 06:53:11 +05:30
Adrià 401e4babaa Merge pull request #11075 from slopgobblercobbler/fix/agc-pipeline-cache-header-validation
fix(agc): validate pipeline cache header format and empty cache paths
2026-10-30 01:38:51 +01:00
Dean 3d1b1c30e8 Merge pull request #12074 from mehmetbayoglu/fix/agc-import-yield-mirrorable-pr
fix(agc): let heap mirrors replace host imports when the import budget is full
2026-10-30 12:20:39 +13:00
Dean 341cf8beee Merge pull request #6498 from Amoenus/codex/fix-msaa-buffer-alias-mainfa
fix(agc): refuse buffer aliases of native MSAA targets
2026-10-30 12:19:53 +13:00
Adrià 195b1889a6 Merge pull request #12645 from slopgobblercobbler/fix/agc-resource-registration-and-rendering-wait
fix(agc): validate rendering wait buffer and expand resource registration tests
2026-10-29 23:28:27 +01:00
Adrià 7b736fe669 Merge pull request #12207 from XairRrR/fix/agc-depth-cube-array-planes
fix(agc): sample a cube array over depth surfaces through their depth planes
2026-10-29 21:21:04 +01:00
Adrià dde1b9f21d Merge pull request #12081 from akkadbakkad89/agc-msaa-single-sample-lines
fix(agc): allow MSAA_ENABLE single-sample lines
2026-10-29 21:20:45 +01:00
Adrià ce9394b844 Merge pull request #12566 from chitters2004/fix/agc-capture-host-only-msaa
fix(agc): write host-only multisample memory as zeros in a capture snapshot
2026-10-29 21:19:01 +01:00
XairRrR 074c229c7f fix(agc): reload a sampled depth plane the guest wrote since its surface was bound
A depth plane with the 64 KiB Z swizzle reloads the units the guest
wrote (SyncFromMemory) when its surface is bound as a depth target, but
sampling the plane through the surface skipped that check and read the
host image. A title that copies depth into the plane with a buffer copy
and samples it before drawing into it again read the depth from before
the copy.

PPSA05684 copies its depth pre-pass into a second depth target with a
buffer copy kernel and samples that copy at once to build the
half-resolution depth its volumetric fog and dust read; only later does
it bind the target. The fog used the previous frame's depth, so a
silhouette followed every moving character through fog and dust.

Sampling a single-sample plane through its surface now runs the same
reload first. agc_driver_depth_plane_sampling gains a case that draws a
plane, writes the guest memory under it and samples it; it reads the
drawn depth without the change.

AI-assisted: yes
2026-10-29 21:04:38 +01:00
Adrià 1578380f6e Merge pull request #12210 from XairRrR/fix/agc-stencil-plane-buffer-coherence
fix(agc): keep stencil planes coherent with guest memory
2026-10-29 20:35:20 +01:00