Commit Graph
962 Commits
Author SHA1 Message Date
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
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
Oscar45397andClaude Opus 5.5 c720a286f7 fix(agc): accept TRUNC_COORD on unnormalized samplers
An S# with FORCE_UNNORMALIZED and TRUNC_COORD was refused. TRUNC_COORD
is already accepted and not applied for normalized coordinates; the
unnormalized path now does the same, and the debt entry covers both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 19:32:45 +01:00
xXPBSXxandClaude Sonnet 5.5 e4bbf01c5c docs(agc): say what shadPS4 and fpPS4 do for FORCE_DEGAMMA on PS4
A new entry next to the FORCE_DEGAMMA entry. shadPS4 converts the filtered texel of every non-sRGB format to linear and fpPS4 documents the bit as applied after filtering regardless of format; here a forcing sampler reads the texture through its sRGB view, so the conversion happens before filtering, for formats that are not sRGB and not on a fixed list. PS4 (GCN) behaviour only; nothing is claimed about the console.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-29 18:26:05 +01:00
Ashwin 4bb5aa9f0e fix(agc): reject unmeasured single-sample dithered alpha-to-coverage 2026-10-29 20:36:02 +05:30
BunnyFlandClaude Opus 5.5 480ca2dff1 Merge branch 'main' into perf/write-watch-page-exclusion
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 15:18:47 +01:00
TehshortbusandClaude Opus 5.5 c037722384 feat(agc): merge a draw into more than one unclamped normalized color target
A draw that blends into several targets with BLEND_CLAMP clear now carries
one merge entry per target. Each entry gets its own storage image and
pixel-shader blend, and every pending entry is stored inside the draw's one
pixel interlock region. Partial writes of packed targets still merge alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 07:00:28 -07:00
slopgobblercobbler c8fcb0bda4 fix(agc): validate pipeline cache header format and empty cache paths 2026-10-29 12:09:44 +01:00
Dean ba5b5330b3 Merge pull request #12706 from Gonic0/fix/agc-barycentric-patches-restart
fix(agc): draw compacted restart lists and restart-free strips through the barycentric patches
2026-10-29 23:56:52 +13:00
Adrià beb5e23f8f Merge pull request #9595 from NaitikJoshiPro/pr/agc-clear-state-num-interp
fix(agc): CLEAR_STATE leaves SPI_PS_IN_CONTROL at NUM_INTERP 2
2026-10-29 11:23:14 +01:00
Adrià 2a90fb105b Merge pull request #9431 from Get-fix/ps4/agc-gcn
feat(libSceAgcDriver): draw PS4 (GCN) command buffers
2026-10-29 09:31:13 +01:00
Dean 4c7d275bef Merge pull request #11684 from oneandonlydean/feat/agc-unclamped-normalized-blend-v2
feat(agc): blend into an unclamped normalized color target in the pixel shader
2026-10-29 20:48:48 +13:00