Commit Graph
198 Commits
Author SHA1 Message Date
Dean 3fea2a937b Merge pull request #11685 from oneandonlydean/port/direct-depth-layer-copy-v2
feat(agc): copy depth planes to and from color storage images directly where maintenance8 allows
2026-10-27 23:03:00 +13:00
Dean a636927e5f Merge pull request #8161 from Celegans12/feat/tools-ab-split
feat(tools): split the periodic reports of an APS5_AB run by phase
2026-10-27 21:34:47 +13:00
Adrià b9a946180a Merge pull request #11046 from simnJS/claude/sweet-faraday-oqfsm5
feat(libSceUsbStorage): pass the host's USB FAT and exFAT volumes through
2026-10-27 08:27:14 +01:00
Dean c72ed0b7c8 Merge pull request #10388 from Tamalero/perf/prebuild-pool-threads
perf(agc): prebuild registration libraries on half the hardware threads by default
2026-10-27 14:59:11 +13:00
Dean 8cc3be6e2b Merge pull request #9098 from EagleBearerYS/perf/libc-collect-without-region-query
perf(libc): read private write watches per allocation without a region query
2026-10-27 14:57:16 +13:00
Dean 37c6b4bc25 Merge pull request #8077 from 0xcrstn/ufc6/descriptor-web-fold
fix(shader): split descriptor webs whose paths fold or hold invalid arms
2026-10-27 14:56:47 +13:00
Dean d1de04f943 Merge pull request #7484 from AlxcBTW/pr/robust-loads
perf(recompiler): leave the descriptor-range comparison out of direct buffer loads when the device zeroes past the range
2026-10-27 14:56:32 +13:00
simnJS 6988438d77 feat(libSceUsbStorage): pass host volumes through only with APS5_USB_STORAGE_PASSTHROUGH
Unset, ScanHostVolumes returns no volume, so nothing is scanned or
exposed and the guest sees no USB storage, as on main. The test checks
that injected volumes are neither listed nor raised by a rescan with the
switch off, and turns it on for the device cases.
2026-10-27 00:01:56 +01:00
Dean 74acfad65b Merge pull request #11365 from oneandonlydean/sa/per-draw-gpu-timing
feat(agc): opt-in per-draw GPU timing and dump-by-address diagnostics
2026-10-27 11:08:24 +13:00
Dean 910e14f3c9 Merge pull request #8896 from teepean/perf/recent-host-imports
perf(agc): find a host import among the last ones found first
2026-10-27 10:52:34 +13:00
Dean b7cfbf0115 Merge pull request #9346 from Techx3/feat/fullscreen-env
feat(libSceVideoOut): open the display window fullscreen with ANYPS5_FULLSCREEN
2026-10-27 10:29:49 +13:00
Yunus Shaikh b2d870962b docs: describe the performance overlay's second page
USAGE.md's performance overlay section now gives F10's cycle (off, page
1, page 2, off) and ANYPS5_OVERLAY=2, a table with one row per line of
page 2 that names each source and the system it comes from, and what the
page costs: the trace totals it turns on while it shows, and the checks
and counters that run while the overlay is hidden or on page 1.
ENVIRONMENT.md's ANYPS5_OVERLAY row lists page 2.
2026-10-26 20:42:30 +01:00
Dean Galvin 9b31471555 feat(agc): copy depth planes to and from color storage images directly where maintenance8 allows
A depth plane and the color storage image that holds or receives its texels were copied image to buffer, then buffer to image. With VK_KHR_maintenance8, which the device already enables, vkCmdCopyImage copies the depth aspect directly to and from a single-component color format of its size (D32 with R32, D16 with R16), so those copies record one image copy and two barriers in place of the staging buffer round trip and three barriers. TakeStorage keeps its discard of the new depth surface before the copy. 24-bit depth, the stencil plane and every other format pair keep the buffer path, as does APS5_NO_DIRECT_DEPTH_COPY=1. The graphics Context now carries the maintenance8 flag. No performance claim is made.
2026-10-27 08:40:41 +13:00
Dean Galvin 09334e1ac5 Merge remote-tracking branch 'up/main' into sa/per-draw-gpu-timing 2026-10-27 08:24:46 +13:00
Dean 930a681f2a Merge pull request #9879 from thuanquang/fix/linear-target-import-creation
perf(agc): create the host import of a linear color target in registered memory
2026-10-27 08:18:22 +13:00
Adrià e38fcb00dc Merge pull request #9989 from milescoviello/fix/result-memo-budget
fix(shader): bound the bytes the recompiler's result memos hold
2026-10-26 15:23:48 +01:00
Adrià 7992f03293 Merge pull request #9703 from frankea/perf/structurizer-construct-walk
refactor(shader): walk each construct when checking the structured constructs
2026-10-26 13:48:49 +01:00
0xcrstnandClaude Opus 5.5 ac0c125999 Merge upstream main into ufc6/descriptor-web-fold
Resolve the overlap with main's WindowLaneGuard and image-resource changes
by keeping both sides: DescriptorFault sits next to WindowLaneGuard in the
opcode list, metadata and side-effect switch, and its emitter next to
EmitWindowLaneGuard; optionalDescriptor is serialized after
remappedDepth1D; undefinedImageWords follows the new image helpers; the
descriptor web debt entry follows main's new entries.

The ImageResource field-count assertion is derived from the merged
structure (44 fields: main's 43 plus optionalDescriptor). sizeof
(ImageResource) stays 96 and sizeof(MemoryInfo) stays 80, so those
assertions are unchanged. The undefined-format test keeps its captured
regions in a variable, as MemoryRegionView no longer binds a temporary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 14:10:30 +02:00
Celegans12 3cf8170ff8 feat(agc): toggle runtime switches in alternating phases of one run
Two runs of the same scene drift apart by more than many effects worth
measuring. APS5_AB=<seconds>:<switch>[+...] alternates phase A (switches
as the environment sets them) and phase B (the listed switches toggled)
at flip packets, under the GPU mutex after the draw pipeline drained,
and prints "[ab] phase A|B <k> begins/settled at present <n> (t <s> s)".
APS5_AB_START (a flip count, or <n>s) delays the first phase and
APS5_AB_SETTLE (default 2 s) marks when a phase's reports are clean.
Switches live in a registry (RuntimeSwitches) of relaxed atomics that
start as the environment sets them; APS5_NO_BARRIER_BATCH is the first,
since every elision it gates is decided per barrier. Any other name
fails the first flip. Without APS5_AB nothing changes.

AI-assisted: yes
2026-10-26 12:26:04 +01:00
Adrià 97934af20b Merge pull request #9702 from frankea/perf/structurizer-split-search
fix(shader): structurize a 4,750-block graph before Unreal's render thread watchdog fires
2026-10-26 11:54:10 +01:00
Dean Galvin e0bd61fae2 Merge branch 'main' into pr/robust-loads 2026-10-26 23:10:10 +13:00
Dean Galvin 8c45681cc3 fix(agc): join gputime keys to drawvariant ids and name queued draws
The [gputime] line printed a draw's range key with the draw flag still set, so an ordinary variant id 0x2 appeared as 0x8000000000000002 next to [drawvariant] 0x2. A draw's key now comes from Recorder::DrawTimingKey and the line prints it through Recorder::TimingKeyLabel as "draw 0x2", the id [drawvariant] names.

The [drawvariant] line was only printed when a draw was recorded inline, so a queued draw's first-seen variant had a timing range with no address line. It is now printed before the draw is handed to the pipeline.

The APS5_PROFILE_GPU_DRAWS row states the label, the shared per-batch query cap and that draws using a recipe are not timed.
2026-10-26 22:33:53 +13:00
SP4C3B4R-8 3cd49f9b9b chore(agc): dump a draw's programs by code address
APS5_DUMP_DRAW_SHADERS also matches a program's code address, so a program
named by [drawvariant] or [gputime] can be dumped directly.
2026-10-26 20:10:08 +13:00
SP4C3B4R-8 631f77e696 perf(agc): time each recorded draw on the GPU by its fragment program
Opt-in with APS5_PROFILE_GPU_DRAWS=1 together with APS5_PROFILE_GPU=1: a [gputime] range around each recorded draw command keyed by the fragment program's variant id, and a [drawvariant] line naming the code address behind each variant id once.
2026-10-26 20:10:08 +13:00
milescovielloandClaude Opus 5.5 8868e09624 fix(shader): bound the bytes the recompiler's result memos hold
Every shader source keeps up to 256 materialized results of
Recompile(request, capture) in its result memo, and as many patch
recipes in its masked memo, with no limit on their bytes. In Ghost of
Tsushima's opening the memos held about 500 MiB after 5 minutes and
kept growing, at a 13 % hit rate.

Each memo entry now counts the bytes its result's vectors keep (the
bindings' vectors included; the module is shared with the prepared
module cache), plus its patch recipe in the masked memo. A result held
by both tables counts once in each. Past a budget, 256 MiB unless
APS5_RESULT_MEMO_MB sets another (0 sets none), the least recently used
entries of both tables of all sources are dropped until three quarters
of the budget is left. The recency stamps come from one clock for all
sources and both tables so they compare across them. The profile line
also reports the trimmed and held entries and their MiB.

The trim takes its lock blocking and repeats, re-reading the bytes held,
until they are within the budget, so the insertion that pushed them
over has its trim run after any other; it stops when nothing is left to
drop.

SetResultMemoBudget and ResultMemoBytes let agc_shader_result_memo_budget
check that a memo over its budget keeps the most recently used results
and drops the oldest one, with the masked memo off. A one-shot hook
inside the trim (SetResultMemoTrimHook) lets
agc_shader_result_memo_budget_threads insert two results from other
threads after the trim has read the bytes held: the memo must still end
within its budget. agc_shader_result_memo_budget_masked, with the masked
memo on, checks that a first result counts its masked entry too and that
a trim empties the masked memo.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 05:04:18 +00:00
Dean d31f372e33 Merge pull request #10062 from imellag/fix/agc-moltenvk-destroy-at-idle
fix(agc): destroy buffers and memory on MoltenVK only while the graphics queue is idle
2026-10-26 14:28:45 +13:00
Adrià 9c6d153dec Merge pull request #10419 from iamthehimansh/split/macos-build
build: compile FileStream, error categories, thread priority and two tests on macOS
2026-10-25 22:35:29 +01:00
Dean Galvin ca82483369 Merge branch 'main' into perf/recent-host-imports 2026-10-26 10:32:48 +13:00
thuanquang 6adad6733c Merge main into fix/linear-target-import-creation 2026-10-26 02:07:34 +07: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
Adrià 7b7d445bfb Merge pull request #9439 from milescoviello/feat/trace-calls-file
feat(libc): write the called imports to APS5_TRACE_CALLS_FILE every 10 seconds
2026-10-25 17:42:50 +01:00
fogydes df18d83072 docs: add the spawn role variable and shorten the waitpid debt 2026-10-25 13:57:18 +01:00
Himansh Raj 3a1d61c5d4 Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-25 17:00:47 +05:30
Adrià 75227c7cdc Merge pull request #10423 from meh7an/perf/shader-masked-result-memo
perf(shader): reuse a memoized result by patching its copied words
2026-10-25 11:50:14 +01:00
Adrià 35e65fb861 Merge pull request #9252 from MarcZX10/docs/trace-label-packet-coverage
docs(agc): describe label trace packet coverage
2026-10-25 11:34:48 +01:00
Himansh Raj 6809dc7b80 Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-25 16:00:54 +05:30
Adrià 654cb0bb4c Merge pull request #9965 from ebarr24/ws/ppsa01746-step1
perf(agc): pipeline queue-0 DMA_DATA by default
2026-10-25 11:06:26 +01:00
Himansh Raj 97d91fa983 Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-25 14:10:23 +05:30
Adrià 6f58a046b1 Merge pull request #9599 from shahulmubeen-a/feat/agc-skip-shader-file
feat(agc): skip the draws and dispatches of the programs listed in a file, re-read while the title runs
2026-10-25 09:32:14 +01:00
Himansh Raj a01a4354db Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-25 12:31:32 +05:30
milescovielloandClaude Opus 5.5 a938dd8f20 feat(libc): write the called imports to APS5_TRACE_CALLS_FILE every 10 seconds
A traced run that ends without a crash or an abort never reports which
imports it called. With APS5_TRACE_CALLS_FILE set, the first traced import
starts a thread that rewrites that file every 10 seconds with every import
called so far, most called first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 00:15:39 +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 a5e015f7b7 Merge main into fix/linear-target-import-creation 2026-10-25 12:56:51 +13:00
Dean Galvin eb3dd54501 Merge main into pr/robust-loads 2026-10-25 12:15:18 +13:00
Yunus Shaikh bc0971afbc Merge #9505's main merge into perf/libc-collect-without-region-query 2026-10-24 12:53:59 -07:00
Shahul Mubeen AandClaude Opus 5.5 e75a166184 fix(agc): ignore skip-file tokens that are not whole hexadecimal addresses
strtoull took the valid hex prefix of a token and ignored the rest, so a
malformed token such as "123garbage" selected program 0x123, and an
overflowing token was not detected. A token now has to be a whole 64-bit
hex number (with an optional 0x prefix); any other token is reported and
ignored. The test adds a list with a malformed token whose prefix is the
first program's address and an overflowing token.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 23:14:58 +05:30
Shahul Mubeen AandClaude Opus 5.5 49b68167fa feat(agc): skip the draws and dispatches of the programs listed in a file
APS5_SKIP_SHADER_FILE names a file of hex program addresses (whitespace
separated, # starts a comment). Draws and dispatches that use a listed
program are dropped as with APS5_SKIP_SHADER. The file is re-read within
500 ms of a change, so passes can be switched off and on while the title
runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 23:14:57 +05:30
Tharun Balaji ea65a95401 feat(agc): trace shader failures through draw submission batches 2026-10-24 18:58:54 +02:00
Adrià f863d6af28 Merge pull request #7814 from ionut27001/fix/videoout-output-status-resolution
fix(libSceVideoOut): report the output resolution from the host display as measured on a PS5
2026-10-24 16:58:48 +02: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