Commit Graph
762 Commits
Author SHA1 Message Date
Adrià cceb6c3c41 Merge pull request #9961 from daviaaze/fix/agc-dcc-sliced-array-window
fix(agc): serve sampled DCC array views from their viewed slices
2026-10-25 21:53:47 +01:00
Adrià 5d48c6233e Merge pull request #9401 from tibzejoker/perf/grow-pipeline-store
perf(agc): size the pipeline store to the title's working set
2026-10-25 19:07:59 +01:00
Davi Azevedo b166232c72 fix(agc): refresh DCC sampled array windows 2026-10-25 14:13:27 -03:00
Dean 79f061ba5b Merge pull request #9685 from thuanquang/fix/linear-target-completion-stores
fix(agc): store resident linear color targets at completion points, limited to their drawn rectangles
2026-10-26 05:44:21 +13:00
Adrià 0658bc8749 Merge pull request #9186 from fma-rc/fix/agc-retire-undrawn-filled-msaa
fix(agc): retire an undrawn filled multisampled color target that a guest access overlaps
2026-10-25 14:25:07 +01:00
Adrià a8b199d103 Merge pull request #7618 from mrfelek/perf/stage-swept-write-only
perf(agc): stage written-only buffer elements a dispatch sweeps on discrete GPUs
2026-10-25 13:19:08 +01:00
Adrià 3eb0770ae9 Merge pull request #9361 from thuanquang/docs/debt-sweep-agc-cb-passes
docs(agc): correct multisampled DCC acceptance in the CB passes debt entry
2026-10-25 11:46:13 +01:00
Adrià ce29789faa Merge pull request #9352 from thuanquang/docs/debt-force-degamma-variant-names
docs(agc): name the 10_11_11 and 2_10_10_10 variants that FORCE_DEGAMMA leaves unchanged
2026-10-25 11:40:07 +01:00
Adrià 8e9cadc1fe Merge pull request #9275 from xXPBSXx/docs-agc-storage-image-uncommitted
docs(debt): record the storage image refusal over uncommitted guest memory
2026-10-25 11:37:52 +01:00
Adrià acbfd7c7fe Merge pull request #9941 from EagleBearerYS/fix/agc-sync-settle-initial-dcc-main2
fix(agc): settle a pending import synchronously before an initial multisampled DCC import
2026-10-25 10:50:05 +01:00
Adrià f4f1160614 Merge pull request #9670 from winstrex/perf/agc-present-queue
perf(agc): present on a queue of its own outside the GPU mutex
2026-10-25 10:28:27 +01:00
Adrià 1240b5da19 Merge pull request #9597 from milescoviello/fix/mipmapped-dcc-target-keys
fix(agc): keep a mipmapped DCC color target's keys on its resident image
2026-10-25 09:29:51 +01:00
Adrià 811ffe10af Merge pull request #9514 from EagleBearerYS/fix/agc-address-copy-evict-main
fix(agc): an address-based build evicts idle imports instead of copying past the cap
2026-10-25 08:40:37 +01:00
slopgobblercobbler f23ef99699 feat(libSceAgcDriver): cover payload packing in sceAgcDriverNopDataWritePacket 2026-10-25 02:36:47 +01:00
milescovielloandClaude Opus 5.5 52f36c8aa2 fix(agc): keep a mipmapped DCC color target's keys on its resident image
DecodeColorBuffer dropped the DCC address of a color target with more than
one mip, so the target's resident image had no keys: it was uploaded from
guest memory under the game's fast-clear keys, and no draw into it marked
them uncompressed. The game's textures over the same chain name the keys,
so they kept sampling the clear (0000 reads as (0,0,0,0)) whatever was
drawn. MXGP 26, Borderlands 4 and Forspoken render such targets.

- ColorTarget.chainDccAddress keeps the keys of a 2D single-layer chain;
  dccAddress stays 0, so the per-draw single-mip key handling is unchanged.
- SurfaceForTarget gives the resident surface those keys, and the image
  then treats them as a multi-mip storage image does: a uniform clear is
  cleared on the GPU at upload, and the first write marks every key
  uncompressed.
- A draw recipe's key check uses the surface's keys.
- sizeof(State) is 840: the recipe codec and CanonicalPipelineState do not
  copy the field.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 00:31:53 +00:00
thibautandClaude Opus 5.5 ad047899bb perf(agc): grow the pipeline store from 1024 up to 4096 entries
The graphics pipeline store kept a fixed 1024 entries and the pipeline journal replayed at most
1024 records, and a replayed pipeline that found the store full was dropped. A title whose
working set is larger rebuilt the rest at the draw on every run, and evicted pipelines it kept
using were rebuilt again and again.

The bound now starts at 1024 and doubles up to 4096: a journal replay that does not fit grows it
instead of dropping the pipeline, and so does eviction churn (a ghost list of evicted keys, checked
every bound/32 evictions: more than half of them came back). It never shrinks during a run;
APS5_PIPELINE_STORE_ENTRIES still fixes it. The journal loads its last 4096 records by default
(APS5_PIPELINE_JOURNAL_ENTRIES). Resident pipelines are bounded by count, not bytes.

agc_driver_recorder_tests --benchmark-pipeline-store-memory [count] (opt-in, not registered)
builds count graphics pipelines with one fragment module each through CachedPipeline and prints
process private bytes and VK_EXT_memory_budget heap usage before and after: with the triangle
shaders about 59 KiB host and no device memory per pipeline on an RTX 4090, 100 KiB host and
8 KiB device-local on a UHD 770.

Tests: agc_pipeline_store_growth (fails on main), agc_pipeline_store_fixed_bound,
agc_pipeline_store_replay_growth (replays on one thread: the mock Vulkan is not thread-safe).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017SNUYRd7sRKZrMYpquAsnU
2026-10-25 02:02:41 +02:00
Dean Galvin f139561693 Merge main into fix/linear-target-completion-stores 2026-10-25 12:57:20 +13:00
Adrià Franch b6bfc78286 docs(agc): keep main's stencil replay debt line 2026-10-24 22:41:08 +02:00
fma-rc a8706b22ba docs(agc): record when an undrawn multisampled target is retired on guest access 2026-10-24 22:41:08 +02:00
Dean Galvin 8807b0e235 test(agc): do not build agc_driver_frame_replay_tests while the test is quarantined (#10711)
The Windows registration check fails when a test executable is built but no ctest test runs it. Put the executable under ANYPS5_RUN_QUARANTINED_FRAME_REPLAY as well, so OFF neither builds nor registers it and ON does both.
2026-10-25 08:22:42 +13:00
Yunus Shaikh 02f6f8e66f Merge main into fix/agc-sync-settle-initial-dcc-main2 2026-10-24 11:49:50 -07:00
Dean Galvin a875c2cc1e test(agc): quarantine agc_driver_frame_replay on Windows until the recorder fix (#10711)
The recorder reads a delta block with ReadCommittedUnsynced while the second DMA copy into it is still in flight, so the capture can hold zeros and the replay then does not reproduce the second copy. The test failed intermittently on the Windows lane. Do not register it on Windows unless ANYPS5_RUN_QUARANTINED_FRAME_REPLAY is ON, and list it in the libSceAgcDriver technical debt.
2026-10-25 07:46:42 +13:00
Adrià Franch 4e35ece5a3 Merge remote-tracking branch 'upstream/main' into HEAD 2026-10-24 20:42:36 +02:00
Adrià 6b23aaf129 Merge pull request #9159 from EagleBearerYS/fix/agc-rewatched-imports-compared-when-shared
fix(agc): keep a rewatched import's memory compared once it is shared
2026-10-24 20:26:38 +02:00
Adrià c035bd5b70 Merge pull request #9424 from hugodearaujo/fix/agc-unset-index-limit
fix(agc): resolve indexed indirect draws on a queue that never set INDEX_BUFFER_SIZE
2026-10-24 20:23:28 +02:00
Adrià 24581200ad Merge pull request #9450 from fma-rc/fix/agc-eqaa-one-fragment
fix(agc): draw a one-fragment multisampled color target as one sample with sample 0's coverage
2026-10-24 20:22:28 +02:00
Dean 1009187128 Merge pull request #9348 from klosixgaming-arch/feat/agc-color-logic-op
feat(agc): apply the color logic operation of CB_COLOR_CONTROL
2026-10-25 06:36:03 +13:00
Yunus Shaikh df89dd1041 Merge main into fix/agc-rewatched-imports-compared-when-shared 2026-10-24 09:51:13 -07:00
Adrià af45c3030e Merge pull request #9406 from JJenkx/fix/depth-plane-unmapped
fix(agc): drop stale depth-plane results whose guest memory was unmapped
2026-10-24 18:43:45 +02:00
Adrià 6da7e42704 Merge pull request #9652 from JJenkx/perf/agc-join-from-run-start
perf(agc): join the imports of a buffer bound from the start of adjacent ranges
2026-10-24 18:28:15 +02:00
Adrià 43768fa237 Merge pull request #8999 from milescoviello/feat/db-depth-copy-draw
feat(agc): draw DB depth copies with a driver pixel program
2026-10-24 17:29:23 +02:00
Dean b607bfdc8b Merge pull request #8213 from milescoviello/fix/journal-stream-modules
fix(agc): read the pipeline journal's modules at replay instead of holding the file
2026-10-25 04:18:44 +13:00
Adrià Franch af673ae694 docs(agc): record the one-fragment color target's unmeasured console behaviour and refused cases 2026-10-24 16:59:57 +02:00
Adrià d098eca3d6 Merge pull request #9185 from janzezno/fix/pixel-interlock-monolithic
fix(agc): build a pipeline with a fragment shader interlock whole, not from libraries
2026-10-24 16:29:56 +02:00
Dean 8e039f083f Merge pull request #9988 from frankea/fix/one-sample-ancillary-unsampled
fix(agc): accept ANCILLARY without PS_ITER_SAMPLE for a one-sample depth target without MSAA_ENABLE
2026-10-25 01:54:06 +13:00
Adrià 6e85617080 Merge pull request #9856 from Pacuka/feat/agc-driver-mem-semaphore
feat(libSceAgcDriver): execute MEM_SEMAPHORE signals and waits
2026-10-24 14:52:55 +02:00
milescovielloandClaude Opus 5.5 88718239a7 fix(agc): read the pipeline journal's modules at replay instead of holding the file
The journal was read whole into one buffer that the decoded modules
viewed, so a replay held the entire file (1 GiB at the default
APS5_PIPELINE_JOURNAL_MAX_MIB) until its last entry was built. The load
now parses the file a record at a time through positioned reads and keeps
it open; a replay thread reads an entry's modules again when it builds the
entry and rejects it when a record no longer reads back as loaded. The
replay report gains the peak module bytes held at once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 14:18:09 +02:00
Dean Galvin 299486d9cf Merge main into feat/agc-color-logic-op 2026-10-25 01:14:01 +13:00
Adrià ce9471f191 Merge pull request #9836 from 00xDisaster/fix/pipeline-journal-no-workflows
fix(agc): keep the pipeline journal's newest pipelines when it is full
2026-10-24 14:13:50 +02:00
thuanquangandClaude befe345441 docs(agc): correct multisampled DCC acceptance in the CB passes debt entry
Co-Authored-By: Claude <[email protected]>
2026-10-24 19:12:50 +07:00
thuanquang d6d8966bba Merge remote-tracking branch 'origin/main' into fix/linear-target-completion-stores
# Conflicts:
#	core/libs/prx/libSceAgcDriver/CMakeLists.txt
2026-10-24 19:09:16 +07:00
mrfelek a293f7901b perf(agc): stage written-only swept elements on discrete GPUs
On a discrete GPU a write-only V# element whose stride is wider than the
widest buffer store (16 bytes) and that a direct dispatch sweeps is staged
in a device-local shadow of up to 256 MiB, as read and written swept
elements are. Its stores no longer cross the bus into the host import.

AI-assisted. Tested by me on my own machine.
2026-10-24 10:22:12 +00:00
Adrià 60465afd3a Merge pull request #7307 from Zenodeon/agc-submit-progress-pr
feat(agc): add opt-in bounded submission progress
2026-10-24 11:59:57 +02:00
milescovielloandClaude Opus 5.5 2181bfc345 feat(agc): draw DB depth copies with a driver pixel program
A draw with DB_RENDER_CONTROL.DEPTH_COPY ran as a compute pass over the
whole surface, chosen when the viewport and scissor covered it. It now
runs as the title's own draw: the precheck rewrites the draw's registers
to bind no depth target and a driver-authored guest pixel program, then
draws it through the normal path. The program reads POS_FIXED_PT, loads
one sample of the Z_32_FLOAT plane through a T# built from the DB
registers (DepthCopySourceWords), and exports it to color target 0 as
32_R, so only the pixels the draw covers are written, and the normal draw
path orders it after the draws that rendered the plane.

- The plane is decoded by decodeDepthPlane, factored out of decodeDepth,
  so its address, pipe-bank XOR and slice match the registered surface.
- Two programs, one per source kind: image_load 2D_MSAA with the sample in
  s8, and image_load 2D. They are published with the null pixel program
  and prepared at use.
- A multisampled plane is read from its host image or sample shadow
  without the guest-memory import checks of native multisample sampling,
  inside a DepthCopySourceScope opened by Graphics::Draw for draws whose
  decode found the multisampled copy program (State::depthCopySource).
- The compute pass, its shader and the CopySample path are removed.
- A new execution test draws depth over a triangle, copies it with the
  same triangle and compares the covered texels with a reference draw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 11:59:00 +02:00
Yunus Shaikh c097fca028 Merge main into fix/agc-sync-settle-initial-dcc-main2 2026-10-24 02:58:50 -07:00
Adrià 672c38f703 Merge pull request #9077 from thuanquang/docs/debt-agc-htile-msaa-stale
docs(agc): correct five stale statements in the HTILE and multisampled target entries
2026-10-24 11:54:34 +02:00
Adrià a78fed26df Merge pull request #8639 from Tripchipp/docs/debt-type0-null-image-link
docs(debt): link the TYPE=0 null image entry to the recompiler
2026-10-24 11:54:29 +02:00
thuanquangandClaude 5536623f6c docs(agc): correct five stale statements in the HTILE and multisampled target entries
Co-Authored-By: Claude <[email protected]>
2026-10-24 11:37:08 +02:00
Dean Galvin eaf4a711e5 Merge main into fix/one-sample-ancillary-unsampled 2026-10-24 22:36:23 +13:00
Adrià 86203bafc1 Merge pull request #9022 from LeandroLP23/docs/agc-drop-cmask-gpl-off-debt
docs(debt): drop the CMASK clear pass entry for AMD without pipeline libraries
2026-10-24 11:33:17 +02:00