perf(agc): fast-path existing imports and open batches in WriteLabelOnGpu #27269

Merged
birdmarty merged 1 commit from upstream-pr/27269 into main 2026-11-27 09:45:23 +00:00
birdmarty commented 2026-11-25 17:31:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by birdmarty on 2026-11-25T17:31:45Z.


What

VulkanDevice::WriteLabelOnGpu is called hundreds to over a thousand times per frame on label writes. Previously, every call on queue 0 ran recorder.Reap() even when an open batch was active and no copied writers or pending completion stores were queued, and then performed a GuestAllocationsLookup + HostImportCovers + HostImportFor sequence even when the label address was already covered by an existing host import.

Changes

  • core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp:
    • Only call recorder.Reap() in WriteLabelOnGpu when !recorder.Recording(), copied writers exist, pending completion stores are nonzero, or APS5_LABEL_GATE_ALL is set with pending completions (uses existing Recorder::Recording(), no Recorder.hpp change).
    • Check Graphics::ExistingHostImportFor(context, address, bytes.size()) first and fall through to GuestAllocationsLookup / HostImportCovers / HostImportFor(..., ImportRequester::Label) (#26718) / HostImportFor / UnregisteredHostImport only on a miss (reusing the HostImport* returned by the Label window call without a second lookup).

Tested

Windows 11 Pro (build 26300), i9-9900K, MinGW-w64 GCC 15.3.0, Release build, AMD Radeon RX 6800 (vendor=0x1002, device=0x73bf), AMD proprietary driver 26.10.1 (Windows driver 32.0.21045.16010, Vulkan 1.4.315).

Unit tests on 929d09c8cb (rebased onto origin/main 0af6efad52) compared against origin/main 0af6efad52 with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (Vulkan SDK 1.4.363.0), VK_LOADER_DEBUG=layer:

  • ctest -R "^(agc_.*label.*|agc_driver_recorder)$": 41 / 41 passed (38 passed, 3 skipped, 0 failed on both origin/main 0af6efad52 and 929d09c8cb, including agc_driver_label_import_window, _draw_pipeline, and _plan_verify from #26718), Insert instance layer "VK_LAYER_KHRONOS_validation" confirmed 51 times on both, 0 VUID- errors.
  • tools/check_conventions.py --base origin/main: passed.
  • tools/debt_fold.py --check: passed.

Synthetic WriteLabelOnGpu CPU microbenchmark (0af6efad52 vs 929d09c8cb, 4 alternating A/B pairs)

Controlled Release benchmark (no validation layer, no trace/profile env vars, identical executable linked against libSceAgcDriver.prx from 0af6efad52 vs 929d09c8cb; 256 registered guest allocations, 33 host imports, 4 alternating fresh-process pairs A1 -> B1 -> ... -> A4 -> B4, verifying reason == 0 on every call and final label bytes after WaitIdle()):

Regime Main 0af6efad52 median (µs/call) 929d09c8cb median (µs/call) Delta Speedup Arms overlap?
Open batch, 1 label block, queue 0 (30k calls/run) 0.587 0.478 -18.6% 1.23× No (0.573–0.605 vs 0.475–0.482)
Open batch, 16 rotating label blocks, queue 0 (30k calls/run) 0.821 0.683 -16.8% 1.20× No (0.794–0.879 vs 0.672–0.703)
Open + in-flight GPU batch (80/80 in flight), 1 block, queue 0 (16k calls/run) 1.620 1.216 -24.9% 1.33× No (1.538–1.892 vs 1.043–1.443)
Open + in-flight GPU batch (80/80 in flight), 16 blocks, queue 0 (16k calls/run) 1.964 1.613 -17.9% 1.22× No (1.813–2.235 vs 1.475–1.712)
Open batch, 16 rotating blocks, compute queue 0x20 (30k calls/run) 0.715 0.712 -0.5% 1.00× Overlap (0.696–0.736 vs 0.709–0.717)

Saving 0.11–0.40 µs per queue-0 label write corresponds to ~0.4 ms/frame at ~1,058 label runs/frame (as in Lies of P below), which explains why isolated whole-frame FPS on a 110 ms/frame scene (or Insomnis at ~105 ms/frame) falls inside run-to-run variance while per-call CPU overhead drops 17–25%.

Lies of P (PPSA10621, v01.012.000, 3200x1800, Krat Central Station Plaza, ~1,058 Graphics.Barrier.label-run/frame):

  • Measured in stack (local test stack on 61250ca018): 10.83 → 10.97 FPS (p50 91.0 → 90.7 ms, p90 99.2 → 96.9 ms, gpu 62.9 → 59.8 ms/f), clean exit with 0 mismatches across 3-verifier live checks.

Performance captures (APS5_TRACE_SECONDS=120:30, clean warm shader cache, no extra APS5_TRACE_* or APS5_PROFILE_* switches)

Same machine, title (PPSA10621, v01.012.000, 3200x1800, Krat Central Station Plaza), and flags (APS5_DRAW_PIPELINE=1 APS5_NO_DRAW_STAGING=1 APS5_PIPELINE_DISPATCH=1 APS5_PIPELINE_DISPATCH_MISSES=1 APS5_FAST_F32=1):

  • Baseline (main, c032ba7c52): 9.00 FPS, p50 110.5 ms, p90 117.7 ms, max 151.1 ms, gpu 70.31 ms/f, Graphics.Draw 72.33 ms/f (aps5-trace-c032ba7c5273-23148.json.gz).
  • This PR (6de3ab3d71a1): 9.01 FPS (+0.01), p50 109.9 ms (-0.6 ms), p90 118.2 ms (+0.5 ms), max 156.7 ms, gpu 69.34 ms/f (-0.97 ms/f), Graphics.Draw 72.95 ms/f (+0.62 ms/f) (aps5-trace-6de3ab3d71a1-35824.json.gz).

Baseline aps5-summary.jsonl (c032ba7c52):

{"commit":"c032ba7c5273","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_FAST_F32":"1","APS5_NO_DRAW_STAGING":"1","APS5_PIPELINE_DISPATCH":"1","APS5_PIPELINE_DISPATCH_MISSES":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:30"},"gpu":"AMD Radeon RX 6800","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32705,"title_id":"PPSA10621","title":"Lies of P","content_version":"01.012.000","resolution":"3200x1800","window":{"spec":"seconds 120:30","first_present":1868,"ms":30000.335},"presents":270,"frame_ms":{"p50":110.451,"p90":117.685,"p99":136.262,"max":151.058},"gpu_busy_ms_per_present":70.305,"worker_busy_pct":{"queue worker 0x0":76.542,"queue worker 0x20":99.732},"phase_totals_ms":{"Driver.Completion":6.857,"Driver.Dispatch":2576.211,"Driver.Dispatch.capture_resources":776.998,"Driver.Dispatch.decode_key_device_setup":90.334,"Driver.Dispatch.lookup_cache":24.295,"Driver.Dispatch.materialize":107.798,"Driver.Dispatch.prepared_invocation":85.609,"Driver.Draw":11311.458,"Driver.Draw.device_setup":2083.563,"Driver.Draw.draw_enqueued":74.404,"Driver.Draw.draw_handed_off":2299.969,"Driver.Draw.post_compile_prepare":4.101,"Driver.Draw.prepare":6471.236,"Driver.Draw.shader_compile_and_link":335.428,"Driver.DrawFinish":13623.764,"Driver.DrawFinish.draw_enqueued":6140.677,"Driver.DrawFinish.post_compile_prepare":173.565,"Driver.DrawFinish.shader_compile_and_link":7239.851,"Driver.EndSubmission":360.907,"Driver.Packet":52514.955,"Driver.Packet.device_lock":253.798,"Driver.Packet.dispatch":3719.685,"Driver.Packet.draw":11447.079,"Driver.Packet.execute":2730.492,"Driver.Packet.flip_flush":6.178,"Driver.Packet.flush_between_packets":606.336,"Driver.Packet.memory_wait":26653.660,"Driver.Packet.pipeline_drain":3757.506,"Driver.Packet.pipeline_prepare":355.259,"Driver.Packet.prepare_memory":1068.661,"Driver.Packet.rendering_wait":0.887,"Driver.Present":1078.304,"Driver.Present.acquire_image":254.049,"Driver.Present.device_setup":0.153,"Driver.Present.gpu_mutex_wait":63.352,"Driver.Present.inflight_wait":0.586,"Driver.Present.present_display_buffer":36.162,"Driver.Present.queue_present":32.722,"Driver.Present.release_and_callback":0.469,"Driver.Present.render_fence_wait":690.093,"Driver.Present.resize":0.449,"Driver.Present.validate":0.114,"Driver.Suspend":0.074,"GpuMutex.wait.copy":0.000,"GpuMutex.wait.dispatch":413.521,"GpuMutex.wait.draw":184.806,"GpuMutex.wait.end":177.694,"GpuMutex.wait.fill":480.794,"GpuMutex.wait.flush":136.035,"GpuMutex.wait.hook":463.906,"GpuMutex.wait.indirect":0.179,"GpuMutex.wait.label":552.065,"GpuMutex.wait.other":282.692,"GpuMutex.wait.present":62.604,"Graphics.Draw":19528.738,"Graphics.Draw.draw_and_resource_release":16102.692,"Graphics.Draw.index_upload":1387.602,"Graphics.Draw.validate":733.456,"Graphics.Draw.vertex_upload":1141.137,"Recorder.Reap":861.632,"Recorder.Submit":1319.579,"Recorder.Sync":1178.759,"Resources.Complete":753.864,"Resources.Prepare":728.019,"Shader.DrawStage":6992.760,"Shader.DrawStage.capture_resources":3601.401,"Shader.DrawStage.materialize":2383.009,"Shader.DrawStage.prepared_invocation":927.267,"VideoOut.Flip":1083.682,"VideoOut.Flip.completion_mutex_wait":0.258,"VideoOut.Flip.config_mutex_wait":0.032,"VideoOut.Flip.frame_limit":0.133,"VideoOut.Flip.notify_game":4.699,"VideoOut.Flip.present":1075.826,"VideoOut.Flip.validate":0.307,"VideoOut.Flip.vblank_wait":0.170,"VideoOut.Flip.window_prepare":0.356,"VideoOut.Flip.window_title":1.683,"VideoOut.Readiness":0.685,"VideoOut.Readiness.locks_validate":0.254,"Vulkan.Acquire":253.762,"Vulkan.Acquire.acquire_fence_wait":232.181,"Vulkan.Acquire.acquire_image":20.320,"Vulkan.Acquire.fence_reset":0.655,"Vulkan.Acquire.retired_swapchains":0.489,"Vulkan.Dispatch":1208.475,"Vulkan.Dispatch.command_record":368.902,"Vulkan.Dispatch.shader_resources":822.450,"Vulkan.DispatchRecipe":32.147,"Vulkan.DispatchRecipe.command_record":31.604,"Vulkan.Present":17.962,"Vulkan.Present.command_record_scale":8.194,"Vulkan.Present.pixel_upload":5.610,"Vulkan.Present.queue_submit":3.959,"Vulkan.QueuePresent":32.203,"Vulkan.QueuePresent.queue_present":31.778,"Vulkan.Retire":1036.495,"Vulkan.Retire.wait":683.040},"top_phases_ms_per_frame":{"Driver.Packet":194.500,"Driver.Packet.memory_wait":98.717,"Graphics.Draw":72.329,"Graphics.Draw.draw_and_resource_release":59.640,"Driver.DrawFinish":50.458,"Driver.Packet.draw":42.397,"Driver.Draw":41.894,"Driver.DrawFinish.shader_compile_and_link":26.814},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":18469,"Graphics.Barrier.dcc-clear":6752,"Graphics.Barrier.dcc-keys":4044,"Graphics.Barrier.dispatch-lead":29397,"Graphics.Barrier.dispatch-trail":44403,"Graphics.Barrier.draw":200066,"Graphics.Barrier.fill":5996,"Graphics.Barrier.fill-clear":1620,"Graphics.Barrier.indirect-args":1080,"Graphics.Barrier.input-mirror":31,"Graphics.Barrier.label-run":285608,"Graphics.Barrier.present-blit":540,"Graphics.Barrier.shadow-publish":927,"Graphics.Barrier.staging-in":43119,"Graphics.Barrier.staging-out":20753,"Graphics.Barrier.storage-upload":292,"Graphics.Barrier.storage-writeback":10235,"Graphics.BarrierMerged.copy":201,"Graphics.BarrierMerged.dispatch-lead":17166,"Graphics.BarrierMerged.fill":2374,"Graphics.BarrierMerged.label-run":1753,"Graphics.BarrierMerged.shadow-publish":927,"Graphics.BarrierMerged.staging-in":19140,"Graphics.BarrierMerged.staging-out":20753,"Graphics.BarrierMerged.storage-writeback":2277,"Graphics.Copy":63947,"Graphics.Copy.bytes":18255207206,"Graphics.RenderPass":119930,"Graphics.RenderPass.Close.command":8707,"Graphics.RenderPass.Close.image":48617,"Graphics.RenderPass.Close.key":14146,"Graphics.RenderPass.Close.label":1753,"Graphics.RenderPass.Close.new-batch":46707,"Graphics.RenderPass.Continued":378527},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":19.158,"events_lost":147525,"totals_full":false},"draw committer":{"events_full_after_s":12.580,"events_lost":360672,"totals_full":false},"draw finisher":{"events_full_after_s":19.018,"events_lost":151019,"totals_full":false}},"trace":"aps5-trace-c032ba7c5273-23148.json.gz"}

Candidate aps5-summary.jsonl (6de3ab3d71a1):

{"commit":"6de3ab3d71a1","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_FAST_F32":"1","APS5_NO_DRAW_STAGING":"1","APS5_PIPELINE_DISPATCH":"1","APS5_PIPELINE_DISPATCH_MISSES":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:30"},"gpu":"AMD Radeon RX 6800","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32705,"title_id":"PPSA10621","title":"Lies of P","content_version":"01.012.000","resolution":"3200x1800","window":{"spec":"seconds 120:30","first_present":1945,"ms":30079.027},"presents":271,"frame_ms":{"p50":109.881,"p90":118.178,"p99":144.378,"max":156.659},"gpu_busy_ms_per_present":69.338,"worker_busy_pct":{"queue worker 0x0":76.461,"queue worker 0x20":99.729},"phase_totals_ms":{"Driver.Completion":6.949,"Driver.Dispatch":2734.968,"Driver.Dispatch.capture_resources":811.603,"Driver.Dispatch.decode_key_device_setup":93.062,"Driver.Dispatch.lookup_cache":24.488,"Driver.Dispatch.materialize":109.404,"Driver.Dispatch.prepared_invocation":84.178,"Driver.Draw":11647.514,"Driver.Draw.device_setup":2236.951,"Driver.Draw.draw_enqueued":78.409,"Driver.Draw.draw_handed_off":2332.133,"Driver.Draw.post_compile_prepare":4.032,"Driver.Draw.prepare":6610.494,"Driver.Draw.shader_compile_and_link":339.925,"Driver.DrawFinish":13762.910,"Driver.DrawFinish.draw_enqueued":6250.712,"Driver.DrawFinish.post_compile_prepare":174.976,"Driver.DrawFinish.shader_compile_and_link":7256.501,"Driver.EndSubmission":299.679,"Driver.Packet":52689.740,"Driver.Packet.device_lock":254.166,"Driver.Packet.dispatch":3864.096,"Driver.Packet.draw":11787.812,"Driver.Packet.execute":2681.143,"Driver.Packet.flip_flush":8.727,"Driver.Packet.flush_between_packets":684.871,"Driver.Packet.memory_wait":26511.018,"Driver.Packet.pipeline_drain":3430.305,"Driver.Packet.pipeline_prepare":355.946,"Driver.Packet.prepare_memory":1223.362,"Driver.Packet.rendering_wait":0.873,"Driver.Present":1084.830,"Driver.Present.acquire_image":275.686,"Driver.Present.device_setup":0.149,"Driver.Present.gpu_mutex_wait":138.169,"Driver.Present.inflight_wait":0.610,"Driver.Present.present_display_buffer":37.383,"Driver.Present.queue_present":33.095,"Driver.Present.release_and_callback":0.495,"Driver.Present.render_fence_wait":598.570,"Driver.Present.resize":0.456,"Driver.Present.validate":0.060,"Driver.Suspend":0.072,"GpuMutex.wait.dispatch":455.808,"GpuMutex.wait.draw":188.772,"GpuMutex.wait.end":141.853,"GpuMutex.wait.fill":538.971,"GpuMutex.wait.flush":127.760,"GpuMutex.wait.hook":542.177,"GpuMutex.wait.indirect":0.111,"GpuMutex.wait.label":671.059,"GpuMutex.wait.other":374.207,"GpuMutex.wait.present":137.414,"Graphics.Draw":19769.758,"Graphics.Draw.draw_and_resource_release":16287.110,"Graphics.Draw.index_upload":1419.566,"Graphics.Draw.validate":753.968,"Graphics.Draw.vertex_upload":1150.853,"Recorder.Reap":830.317,"Recorder.Submit":1307.979,"Recorder.Sync":1333.600,"Resources.Complete":736.219,"Resources.Prepare":727.699,"Shader.DrawStage":7023.617,"Shader.DrawStage.capture_resources":3641.652,"Shader.DrawStage.materialize":2378.787,"Shader.DrawStage.prepared_invocation":921.471,"VideoOut.Flip":1091.642,"VideoOut.Flip.completion_mutex_wait":0.227,"VideoOut.Flip.config_mutex_wait":0.032,"VideoOut.Flip.frame_limit":0.136,"VideoOut.Flip.notify_game":5.014,"VideoOut.Flip.present":1083.647,"VideoOut.Flip.validate":0.300,"VideoOut.Flip.vblank_wait":0.179,"VideoOut.Flip.window_prepare":0.353,"VideoOut.Flip.window_title":1.527,"VideoOut.Readiness":0.613,"VideoOut.Readiness.locks_validate":0.214,"Vulkan.Acquire":275.412,"Vulkan.Acquire.acquire_fence_wait":253.775,"Vulkan.Acquire.acquire_image":20.327,"Vulkan.Acquire.fence_reset":0.687,"Vulkan.Acquire.retired_swapchains":0.515,"Vulkan.Dispatch":1165.686,"Vulkan.Dispatch.command_record":369.003,"Vulkan.Dispatch.shader_resources":779.349,"Vulkan.DispatchRecipe":33.343,"Vulkan.DispatchRecipe.command_record":32.819,"Vulkan.Present":18.461,"Vulkan.Present.command_record_scale":8.429,"Vulkan.Present.pixel_upload":5.612,"Vulkan.Present.queue_submit":4.197,"Vulkan.QueuePresent":32.529,"Vulkan.QueuePresent.queue_present":32.087,"Vulkan.Retire":873.044,"Vulkan.Retire.wait":591.637},"top_phases_ms_per_frame":{"Driver.Packet":194.427,"Driver.Packet.memory_wait":97.827,"Graphics.Draw":72.951,"Graphics.Draw.draw_and_resource_release":60.100,"Driver.DrawFinish":50.786,"Driver.Packet.draw":43.497,"Driver.Draw":42.980,"Driver.DrawFinish.shader_compile_and_link":26.777},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":18682,"Graphics.Barrier.dcc-clear":6776,"Graphics.Barrier.dcc-keys":4054,"Graphics.Barrier.dispatch-lead":28974,"Graphics.Barrier.dispatch-trail":44600,"Graphics.Barrier.draw":199688,"Graphics.Barrier.fill":6068,"Graphics.Barrier.fill-clear":1626,"Graphics.Barrier.indirect-args":1084,"Graphics.Barrier.input-mirror":50,"Graphics.Barrier.label-run":282656,"Graphics.Barrier.present-blit":542,"Graphics.Barrier.shadow-publish":829,"Graphics.Barrier.staging-in":43240,"Graphics.Barrier.staging-out":20784,"Graphics.Barrier.storage-upload":292,"Graphics.Barrier.storage-writeback":10061,"Graphics.BarrierMerged.copy":64,"Graphics.BarrierMerged.dispatch-lead":17794,"Graphics.BarrierMerged.fill":2332,"Graphics.BarrierMerged.label-run":1831,"Graphics.BarrierMerged.shadow-publish":829,"Graphics.BarrierMerged.staging-in":19112,"Graphics.BarrierMerged.staging-out":20784,"Graphics.BarrierMerged.storage-writeback":2178,"Graphics.Copy":64114,"Graphics.Copy.bytes":26767838898,"Graphics.RenderPass":119983,"Graphics.RenderPass.Close.command":8610,"Graphics.RenderPass.Close.image":49326,"Graphics.RenderPass.Close.key":14211,"Graphics.RenderPass.Close.label":1831,"Graphics.RenderPass.Close.new-batch":46005,"Graphics.RenderPass.Continued":380207},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":18.580,"events_lost":155705,"totals_full":false},"draw committer":{"events_full_after_s":12.499,"events_lost":364428,"totals_full":false},"draw finisher":{"events_full_after_s":18.522,"events_lost":156572,"totals_full":false}},"trace":"aps5-trace-6de3ab3d71a1-35824.json.gz"}

Series context & interleaved ablation

This PR is part of a general AGC/libc performance series measured on Lies of P (PPSA10621, v01.012.000, 3200x1800, UE4) covering #27249, #27250, #27251, #27252, #27253, #27254, #27268, #27269, #27270, #27271, and #27273 (tested together with #20130, #18757, #26778, #27117, and now-merged #26581 and #26681). Combined on base 61250ca018 (plus remaining unsplit stack changes), steady-state performance rose from 7.25 FPS (p50 135.6 ms, gpu 92.7 ms/f, default settings) to 12.15 FPS average (12.00 / 12.30 FPS, peak 12.33 FPS, p50 81.5 ms, gpu 57.12 ms/f, +67.6% to +70.1%).

Because five of the smaller PRs (#27253, #27254, #27270, #27271, and #27273) looked like they slightly lost average FPS (-0.03 to -0.31 FPS) in single isolated runs on c032ba7c52, we ran an interleaved 4-run ablation (A1 -> B1 -> A2 -> B2, APS5_TRACE_SECONDS=120:30, identical warm shader cache and flags) on the full stack to test whether removing those 5 PRs helped or hurt:

Run Build FPS p50 (ms) p90 (ms) max (ms) GPU busy (ms/f) DrawWithRecipe (ms/f) DrawFinish (ms/f)
A1 Arm A (base 61250ca018, WITH all 11 PRs incl. #27253, #27254, #27270, #27271, #27273) 12.00 81.9 90.5 117.9 58.58 46.22 42.16
B1 Arm B (base 61250ca018, MINUS #27253, #27254, #27270, #27271, #27273) 11.86 82.4 92.9 122.9 58.96 46.65 42.71
A2 Arm A (base 61250ca018, WITH all 11 PRs incl. #27253, #27254, #27270, #27271, #27273) 12.30 81.0 87.3 108.8 55.66 45.71 42.24
B2 Arm B (base 61250ca018, MINUS #27253, #27254, #27270, #27271, #27273) 11.65 84.7 94.1 124.8 61.69 47.32 43.45
Arm A avg Full stack (WITH all 11 PRs) 12.15 81.5 88.9 113.4 57.12 45.96 42.20
Arm B avg Minus #27253, #27254, #27270, #27271, #27273 11.76 83.5 93.5 123.9 60.33 46.98 43.08
Effect of the 5 PRs (A vs B) — +0.39 FPS (+3.3%) -2.1 ms -4.6 ms -10.5 ms -3.21 ms/f -1.02 ms/f -0.88 ms/f

Removing those 5 PRs hurt every run (A1 > B1 and A2 > B2 across all metrics), showing that their single-run isolated dips on c032ba7c52 were within ±0.25 FPS scene variance while larger bottlenecks (#27268, #27249, #27252, #20130, #18757) still dominated. Individual PR captures above remain isolated against c032ba7c52.

Not tested: NVIDIA/Intel GPUs, fresh Lies of P capture on rebased 929d09c8cb (captures above are from 6de3ab3d71; JJenkx also ran 6de3ab3d71 on Insomnis PPSA06829 on Linux/RADV RX 6650 XT with no crashes and overlapping 9.52 vs 9.81 FPS arms).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 6800 (vendor=0x1002, device=0x73bf), AMD proprietary driver 26.10.1 (Windows driver 32.0.21045.16010, Vulkan 1.4.315), Windows 11 Pro (build 26300); Khronos validation layer on main 0af6efad52 and this change, 0 VUIDs
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5496075253 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/27269). Originally posted by [birdmarty](https://github.com/birdmarty) on 2026-11-25T17:31:45Z. --- ### What `VulkanDevice::WriteLabelOnGpu` is called hundreds to over a thousand times per frame on label writes. Previously, every call on queue 0 ran `recorder.Reap()` even when an open batch was active and no copied writers or pending completion stores were queued, and then performed a `GuestAllocationsLookup` + `HostImportCovers` + `HostImportFor` sequence even when the label address was already covered by an existing host import. #### Changes - `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`: - Only call `recorder.Reap()` in `WriteLabelOnGpu` when `!recorder.Recording()`, copied writers exist, pending completion stores are nonzero, or `APS5_LABEL_GATE_ALL` is set with pending completions (uses existing `Recorder::Recording()`, no `Recorder.hpp` change). - Check `Graphics::ExistingHostImportFor(context, address, bytes.size())` first and fall through to `GuestAllocationsLookup` / `HostImportCovers` / `HostImportFor(..., ImportRequester::Label)` (#26718) / `HostImportFor` / `UnregisteredHostImport` only on a miss (reusing the `HostImport*` returned by the `Label` window call without a second lookup). ### Tested Windows 11 Pro (build 26300), i9-9900K, MinGW-w64 GCC 15.3.0, Release build, AMD Radeon RX 6800 (`vendor=0x1002`, `device=0x73bf`), AMD proprietary driver `26.10.1` (Windows driver `32.0.21045.16010`, Vulkan `1.4.315`). Unit tests on 929d09c8cb (rebased onto `origin/main` 0af6efad52) compared against `origin/main` 0af6efad52 with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (Vulkan SDK `1.4.363.0`), `VK_LOADER_DEBUG=layer`: - `ctest -R "^(agc_.*label.*|agc_driver_recorder)$"`: **41 / 41 passed** (`38 passed, 3 skipped, 0 failed` on both `origin/main` 0af6efad52 and 929d09c8cb, including `agc_driver_label_import_window`, `_draw_pipeline`, and `_plan_verify` from #26718), `Insert instance layer "VK_LAYER_KHRONOS_validation"` confirmed 51 times on both, **0 `VUID-` errors**. - `tools/check_conventions.py --base origin/main`: passed. - `tools/debt_fold.py --check`: passed. #### Synthetic `WriteLabelOnGpu` CPU microbenchmark (0af6efad52 vs 929d09c8cb, 4 alternating A/B pairs) Controlled Release benchmark (no validation layer, no trace/profile env vars, identical executable linked against `libSceAgcDriver.prx` from 0af6efad52 vs 929d09c8cb; 256 registered guest allocations, 33 host imports, 4 alternating fresh-process pairs `A1 -> B1 -> ... -> A4 -> B4`, verifying `reason == 0` on every call and final label bytes after `WaitIdle()`): | Regime | Main 0af6efad52 median (µs/call) | 929d09c8cb median (µs/call) | Delta | Speedup | Arms overlap? | |---|---:|---:|---:|---:|---| | Open batch, 1 label block, queue 0 (30k calls/run) | 0.587 | 0.478 | **-18.6%** | **1.23×** | No (`0.573–0.605` vs `0.475–0.482`) | | Open batch, 16 rotating label blocks, queue 0 (30k calls/run) | 0.821 | 0.683 | **-16.8%** | **1.20×** | No (`0.794–0.879` vs `0.672–0.703`) | | Open + in-flight GPU batch (`80/80` in flight), 1 block, queue 0 (16k calls/run) | 1.620 | 1.216 | **-24.9%** | **1.33×** | No (`1.538–1.892` vs `1.043–1.443`) | | Open + in-flight GPU batch (`80/80` in flight), 16 blocks, queue 0 (16k calls/run) | 1.964 | 1.613 | **-17.9%** | **1.22×** | No (`1.813–2.235` vs `1.475–1.712`) | | Open batch, 16 rotating blocks, compute queue `0x20` (30k calls/run) | 0.715 | 0.712 | -0.5% | 1.00× | Overlap (`0.696–0.736` vs `0.709–0.717`) | Saving `0.11–0.40 µs` per queue-0 label write corresponds to `~0.4 ms/frame` at `~1,058` label runs/frame (as in Lies of P below), which explains why isolated whole-frame FPS on a `110 ms/frame` scene (or Insomnis at `~105 ms/frame`) falls inside run-to-run variance while per-call CPU overhead drops `17–25%`. Lies of P (`PPSA10621`, `v01.012.000`, `3200x1800`, Krat Central Station Plaza, `~1,058` `Graphics.Barrier.label-run`/frame): - Measured in stack (local test stack on 61250ca018): `10.83 → 10.97 FPS` (`p50 91.0 → 90.7 ms`, `p90 99.2 → 96.9 ms`, `gpu 62.9 → 59.8 ms/f`), clean exit with 0 mismatches across 3-verifier live checks. #### Performance captures (`APS5_TRACE_SECONDS=120:30`, clean warm shader cache, no extra `APS5_TRACE_*` or `APS5_PROFILE_*` switches) Same machine, title (`PPSA10621`, `v01.012.000`, `3200x1800`, Krat Central Station Plaza), and flags (`APS5_DRAW_PIPELINE=1 APS5_NO_DRAW_STAGING=1 APS5_PIPELINE_DISPATCH=1 APS5_PIPELINE_DISPATCH_MISSES=1 APS5_FAST_F32=1`): - Baseline (`main`, c032ba7c5273): `9.00 FPS`, `p50 110.5 ms`, `p90 117.7 ms`, `max 151.1 ms`, `gpu 70.31 ms/f`, `Graphics.Draw 72.33 ms/f` (`aps5-trace-c032ba7c5273-23148.json.gz`). - This PR (6de3ab3d71a1): `9.01 FPS` (`+0.01`), `p50 109.9 ms` (`-0.6 ms`), `p90 118.2 ms` (`+0.5 ms`), `max 156.7 ms`, `gpu 69.34 ms/f` (`-0.97 ms/f`), `Graphics.Draw 72.95 ms/f` (`+0.62 ms/f`) (`aps5-trace-6de3ab3d71a1-35824.json.gz`). Baseline `aps5-summary.jsonl` (c032ba7c5273): ```json {"commit":"c032ba7c5273","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_FAST_F32":"1","APS5_NO_DRAW_STAGING":"1","APS5_PIPELINE_DISPATCH":"1","APS5_PIPELINE_DISPATCH_MISSES":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:30"},"gpu":"AMD Radeon RX 6800","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32705,"title_id":"PPSA10621","title":"Lies of P","content_version":"01.012.000","resolution":"3200x1800","window":{"spec":"seconds 120:30","first_present":1868,"ms":30000.335},"presents":270,"frame_ms":{"p50":110.451,"p90":117.685,"p99":136.262,"max":151.058},"gpu_busy_ms_per_present":70.305,"worker_busy_pct":{"queue worker 0x0":76.542,"queue worker 0x20":99.732},"phase_totals_ms":{"Driver.Completion":6.857,"Driver.Dispatch":2576.211,"Driver.Dispatch.capture_resources":776.998,"Driver.Dispatch.decode_key_device_setup":90.334,"Driver.Dispatch.lookup_cache":24.295,"Driver.Dispatch.materialize":107.798,"Driver.Dispatch.prepared_invocation":85.609,"Driver.Draw":11311.458,"Driver.Draw.device_setup":2083.563,"Driver.Draw.draw_enqueued":74.404,"Driver.Draw.draw_handed_off":2299.969,"Driver.Draw.post_compile_prepare":4.101,"Driver.Draw.prepare":6471.236,"Driver.Draw.shader_compile_and_link":335.428,"Driver.DrawFinish":13623.764,"Driver.DrawFinish.draw_enqueued":6140.677,"Driver.DrawFinish.post_compile_prepare":173.565,"Driver.DrawFinish.shader_compile_and_link":7239.851,"Driver.EndSubmission":360.907,"Driver.Packet":52514.955,"Driver.Packet.device_lock":253.798,"Driver.Packet.dispatch":3719.685,"Driver.Packet.draw":11447.079,"Driver.Packet.execute":2730.492,"Driver.Packet.flip_flush":6.178,"Driver.Packet.flush_between_packets":606.336,"Driver.Packet.memory_wait":26653.660,"Driver.Packet.pipeline_drain":3757.506,"Driver.Packet.pipeline_prepare":355.259,"Driver.Packet.prepare_memory":1068.661,"Driver.Packet.rendering_wait":0.887,"Driver.Present":1078.304,"Driver.Present.acquire_image":254.049,"Driver.Present.device_setup":0.153,"Driver.Present.gpu_mutex_wait":63.352,"Driver.Present.inflight_wait":0.586,"Driver.Present.present_display_buffer":36.162,"Driver.Present.queue_present":32.722,"Driver.Present.release_and_callback":0.469,"Driver.Present.render_fence_wait":690.093,"Driver.Present.resize":0.449,"Driver.Present.validate":0.114,"Driver.Suspend":0.074,"GpuMutex.wait.copy":0.000,"GpuMutex.wait.dispatch":413.521,"GpuMutex.wait.draw":184.806,"GpuMutex.wait.end":177.694,"GpuMutex.wait.fill":480.794,"GpuMutex.wait.flush":136.035,"GpuMutex.wait.hook":463.906,"GpuMutex.wait.indirect":0.179,"GpuMutex.wait.label":552.065,"GpuMutex.wait.other":282.692,"GpuMutex.wait.present":62.604,"Graphics.Draw":19528.738,"Graphics.Draw.draw_and_resource_release":16102.692,"Graphics.Draw.index_upload":1387.602,"Graphics.Draw.validate":733.456,"Graphics.Draw.vertex_upload":1141.137,"Recorder.Reap":861.632,"Recorder.Submit":1319.579,"Recorder.Sync":1178.759,"Resources.Complete":753.864,"Resources.Prepare":728.019,"Shader.DrawStage":6992.760,"Shader.DrawStage.capture_resources":3601.401,"Shader.DrawStage.materialize":2383.009,"Shader.DrawStage.prepared_invocation":927.267,"VideoOut.Flip":1083.682,"VideoOut.Flip.completion_mutex_wait":0.258,"VideoOut.Flip.config_mutex_wait":0.032,"VideoOut.Flip.frame_limit":0.133,"VideoOut.Flip.notify_game":4.699,"VideoOut.Flip.present":1075.826,"VideoOut.Flip.validate":0.307,"VideoOut.Flip.vblank_wait":0.170,"VideoOut.Flip.window_prepare":0.356,"VideoOut.Flip.window_title":1.683,"VideoOut.Readiness":0.685,"VideoOut.Readiness.locks_validate":0.254,"Vulkan.Acquire":253.762,"Vulkan.Acquire.acquire_fence_wait":232.181,"Vulkan.Acquire.acquire_image":20.320,"Vulkan.Acquire.fence_reset":0.655,"Vulkan.Acquire.retired_swapchains":0.489,"Vulkan.Dispatch":1208.475,"Vulkan.Dispatch.command_record":368.902,"Vulkan.Dispatch.shader_resources":822.450,"Vulkan.DispatchRecipe":32.147,"Vulkan.DispatchRecipe.command_record":31.604,"Vulkan.Present":17.962,"Vulkan.Present.command_record_scale":8.194,"Vulkan.Present.pixel_upload":5.610,"Vulkan.Present.queue_submit":3.959,"Vulkan.QueuePresent":32.203,"Vulkan.QueuePresent.queue_present":31.778,"Vulkan.Retire":1036.495,"Vulkan.Retire.wait":683.040},"top_phases_ms_per_frame":{"Driver.Packet":194.500,"Driver.Packet.memory_wait":98.717,"Graphics.Draw":72.329,"Graphics.Draw.draw_and_resource_release":59.640,"Driver.DrawFinish":50.458,"Driver.Packet.draw":42.397,"Driver.Draw":41.894,"Driver.DrawFinish.shader_compile_and_link":26.814},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":18469,"Graphics.Barrier.dcc-clear":6752,"Graphics.Barrier.dcc-keys":4044,"Graphics.Barrier.dispatch-lead":29397,"Graphics.Barrier.dispatch-trail":44403,"Graphics.Barrier.draw":200066,"Graphics.Barrier.fill":5996,"Graphics.Barrier.fill-clear":1620,"Graphics.Barrier.indirect-args":1080,"Graphics.Barrier.input-mirror":31,"Graphics.Barrier.label-run":285608,"Graphics.Barrier.present-blit":540,"Graphics.Barrier.shadow-publish":927,"Graphics.Barrier.staging-in":43119,"Graphics.Barrier.staging-out":20753,"Graphics.Barrier.storage-upload":292,"Graphics.Barrier.storage-writeback":10235,"Graphics.BarrierMerged.copy":201,"Graphics.BarrierMerged.dispatch-lead":17166,"Graphics.BarrierMerged.fill":2374,"Graphics.BarrierMerged.label-run":1753,"Graphics.BarrierMerged.shadow-publish":927,"Graphics.BarrierMerged.staging-in":19140,"Graphics.BarrierMerged.staging-out":20753,"Graphics.BarrierMerged.storage-writeback":2277,"Graphics.Copy":63947,"Graphics.Copy.bytes":18255207206,"Graphics.RenderPass":119930,"Graphics.RenderPass.Close.command":8707,"Graphics.RenderPass.Close.image":48617,"Graphics.RenderPass.Close.key":14146,"Graphics.RenderPass.Close.label":1753,"Graphics.RenderPass.Close.new-batch":46707,"Graphics.RenderPass.Continued":378527},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":19.158,"events_lost":147525,"totals_full":false},"draw committer":{"events_full_after_s":12.580,"events_lost":360672,"totals_full":false},"draw finisher":{"events_full_after_s":19.018,"events_lost":151019,"totals_full":false}},"trace":"aps5-trace-c032ba7c5273-23148.json.gz"} ``` Candidate `aps5-summary.jsonl` (6de3ab3d71a1): ```json {"commit":"6de3ab3d71a1","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_FAST_F32":"1","APS5_NO_DRAW_STAGING":"1","APS5_PIPELINE_DISPATCH":"1","APS5_PIPELINE_DISPATCH_MISSES":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:30"},"gpu":"AMD Radeon RX 6800","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32705,"title_id":"PPSA10621","title":"Lies of P","content_version":"01.012.000","resolution":"3200x1800","window":{"spec":"seconds 120:30","first_present":1945,"ms":30079.027},"presents":271,"frame_ms":{"p50":109.881,"p90":118.178,"p99":144.378,"max":156.659},"gpu_busy_ms_per_present":69.338,"worker_busy_pct":{"queue worker 0x0":76.461,"queue worker 0x20":99.729},"phase_totals_ms":{"Driver.Completion":6.949,"Driver.Dispatch":2734.968,"Driver.Dispatch.capture_resources":811.603,"Driver.Dispatch.decode_key_device_setup":93.062,"Driver.Dispatch.lookup_cache":24.488,"Driver.Dispatch.materialize":109.404,"Driver.Dispatch.prepared_invocation":84.178,"Driver.Draw":11647.514,"Driver.Draw.device_setup":2236.951,"Driver.Draw.draw_enqueued":78.409,"Driver.Draw.draw_handed_off":2332.133,"Driver.Draw.post_compile_prepare":4.032,"Driver.Draw.prepare":6610.494,"Driver.Draw.shader_compile_and_link":339.925,"Driver.DrawFinish":13762.910,"Driver.DrawFinish.draw_enqueued":6250.712,"Driver.DrawFinish.post_compile_prepare":174.976,"Driver.DrawFinish.shader_compile_and_link":7256.501,"Driver.EndSubmission":299.679,"Driver.Packet":52689.740,"Driver.Packet.device_lock":254.166,"Driver.Packet.dispatch":3864.096,"Driver.Packet.draw":11787.812,"Driver.Packet.execute":2681.143,"Driver.Packet.flip_flush":8.727,"Driver.Packet.flush_between_packets":684.871,"Driver.Packet.memory_wait":26511.018,"Driver.Packet.pipeline_drain":3430.305,"Driver.Packet.pipeline_prepare":355.946,"Driver.Packet.prepare_memory":1223.362,"Driver.Packet.rendering_wait":0.873,"Driver.Present":1084.830,"Driver.Present.acquire_image":275.686,"Driver.Present.device_setup":0.149,"Driver.Present.gpu_mutex_wait":138.169,"Driver.Present.inflight_wait":0.610,"Driver.Present.present_display_buffer":37.383,"Driver.Present.queue_present":33.095,"Driver.Present.release_and_callback":0.495,"Driver.Present.render_fence_wait":598.570,"Driver.Present.resize":0.456,"Driver.Present.validate":0.060,"Driver.Suspend":0.072,"GpuMutex.wait.dispatch":455.808,"GpuMutex.wait.draw":188.772,"GpuMutex.wait.end":141.853,"GpuMutex.wait.fill":538.971,"GpuMutex.wait.flush":127.760,"GpuMutex.wait.hook":542.177,"GpuMutex.wait.indirect":0.111,"GpuMutex.wait.label":671.059,"GpuMutex.wait.other":374.207,"GpuMutex.wait.present":137.414,"Graphics.Draw":19769.758,"Graphics.Draw.draw_and_resource_release":16287.110,"Graphics.Draw.index_upload":1419.566,"Graphics.Draw.validate":753.968,"Graphics.Draw.vertex_upload":1150.853,"Recorder.Reap":830.317,"Recorder.Submit":1307.979,"Recorder.Sync":1333.600,"Resources.Complete":736.219,"Resources.Prepare":727.699,"Shader.DrawStage":7023.617,"Shader.DrawStage.capture_resources":3641.652,"Shader.DrawStage.materialize":2378.787,"Shader.DrawStage.prepared_invocation":921.471,"VideoOut.Flip":1091.642,"VideoOut.Flip.completion_mutex_wait":0.227,"VideoOut.Flip.config_mutex_wait":0.032,"VideoOut.Flip.frame_limit":0.136,"VideoOut.Flip.notify_game":5.014,"VideoOut.Flip.present":1083.647,"VideoOut.Flip.validate":0.300,"VideoOut.Flip.vblank_wait":0.179,"VideoOut.Flip.window_prepare":0.353,"VideoOut.Flip.window_title":1.527,"VideoOut.Readiness":0.613,"VideoOut.Readiness.locks_validate":0.214,"Vulkan.Acquire":275.412,"Vulkan.Acquire.acquire_fence_wait":253.775,"Vulkan.Acquire.acquire_image":20.327,"Vulkan.Acquire.fence_reset":0.687,"Vulkan.Acquire.retired_swapchains":0.515,"Vulkan.Dispatch":1165.686,"Vulkan.Dispatch.command_record":369.003,"Vulkan.Dispatch.shader_resources":779.349,"Vulkan.DispatchRecipe":33.343,"Vulkan.DispatchRecipe.command_record":32.819,"Vulkan.Present":18.461,"Vulkan.Present.command_record_scale":8.429,"Vulkan.Present.pixel_upload":5.612,"Vulkan.Present.queue_submit":4.197,"Vulkan.QueuePresent":32.529,"Vulkan.QueuePresent.queue_present":32.087,"Vulkan.Retire":873.044,"Vulkan.Retire.wait":591.637},"top_phases_ms_per_frame":{"Driver.Packet":194.427,"Driver.Packet.memory_wait":97.827,"Graphics.Draw":72.951,"Graphics.Draw.draw_and_resource_release":60.100,"Driver.DrawFinish":50.786,"Driver.Packet.draw":43.497,"Driver.Draw":42.980,"Driver.DrawFinish.shader_compile_and_link":26.777},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":18682,"Graphics.Barrier.dcc-clear":6776,"Graphics.Barrier.dcc-keys":4054,"Graphics.Barrier.dispatch-lead":28974,"Graphics.Barrier.dispatch-trail":44600,"Graphics.Barrier.draw":199688,"Graphics.Barrier.fill":6068,"Graphics.Barrier.fill-clear":1626,"Graphics.Barrier.indirect-args":1084,"Graphics.Barrier.input-mirror":50,"Graphics.Barrier.label-run":282656,"Graphics.Barrier.present-blit":542,"Graphics.Barrier.shadow-publish":829,"Graphics.Barrier.staging-in":43240,"Graphics.Barrier.staging-out":20784,"Graphics.Barrier.storage-upload":292,"Graphics.Barrier.storage-writeback":10061,"Graphics.BarrierMerged.copy":64,"Graphics.BarrierMerged.dispatch-lead":17794,"Graphics.BarrierMerged.fill":2332,"Graphics.BarrierMerged.label-run":1831,"Graphics.BarrierMerged.shadow-publish":829,"Graphics.BarrierMerged.staging-in":19112,"Graphics.BarrierMerged.staging-out":20784,"Graphics.BarrierMerged.storage-writeback":2178,"Graphics.Copy":64114,"Graphics.Copy.bytes":26767838898,"Graphics.RenderPass":119983,"Graphics.RenderPass.Close.command":8610,"Graphics.RenderPass.Close.image":49326,"Graphics.RenderPass.Close.key":14211,"Graphics.RenderPass.Close.label":1831,"Graphics.RenderPass.Close.new-batch":46005,"Graphics.RenderPass.Continued":380207},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":18.580,"events_lost":155705,"totals_full":false},"draw committer":{"events_full_after_s":12.499,"events_lost":364428,"totals_full":false},"draw finisher":{"events_full_after_s":18.522,"events_lost":156572,"totals_full":false}},"trace":"aps5-trace-6de3ab3d71a1-35824.json.gz"} ``` #### Series context & interleaved ablation This PR is part of a general AGC/libc performance series measured on Lies of P (`PPSA10621`, `v01.012.000`, `3200x1800`, UE4) covering #27249, #27250, #27251, #27252, #27253, #27254, #27268, #27269, #27270, #27271, and #27273 (tested together with #20130, #18757, #26778, #27117, and now-merged #26581 and #26681). Combined on base 61250ca018 (plus remaining unsplit stack changes), steady-state performance rose from `7.25 FPS` (`p50 135.6 ms`, `gpu 92.7 ms/f`, default settings) to `12.15 FPS` average (`12.00` / `12.30 FPS`, peak `12.33 FPS`, `p50 81.5 ms`, `gpu 57.12 ms/f`, `+67.6%` to `+70.1%`). Because five of the smaller PRs (#27253, #27254, #27270, #27271, and #27273) looked like they slightly lost average FPS (`-0.03` to `-0.31 FPS`) in single isolated runs on c032ba7c52, we ran an interleaved 4-run ablation (`A1 -> B1 -> A2 -> B2`, `APS5_TRACE_SECONDS=120:30`, identical warm shader cache and flags) on the full stack to test whether removing those 5 PRs helped or hurt: - **Arm A — Full stack on base 61250ca018 (WITH all 11 PRs):** #27249, #27250, #27251, #27252, #27253, #27254, #27268, #27269, #27270, #27271, #27273 + #20130, #18757, #26778, #27117, #26581, #26681 + remaining unsplit stack changes (per-64 KiB proof/pending tracking and ShapeRecipe). - **Arm B — Same stack on base 61250ca018 MINUS the 5 PRs (#27253, #27254, #27270, #27271, #27273):** keeps #27249, #27250, #27251, #27252, #27268, #27269 + #20130, #18757, #26778, #27117, #26581, #26681 + remaining unsplit stack changes. | Run | Build | FPS | p50 (ms) | p90 (ms) | max (ms) | GPU busy (ms/f) | `DrawWithRecipe` (ms/f) | `DrawFinish` (ms/f) | |---|---|---:|---:|---:|---:|---:|---:|---:| | **A1** | Arm A (base 61250ca018, WITH all 11 PRs incl. #27253, #27254, #27270, #27271, #27273) | **12.00** | **81.9** | **90.5** | **117.9** | **58.58** | **46.22** | **42.16** | | **B1** | Arm B (base 61250ca018, MINUS #27253, #27254, #27270, #27271, #27273) | 11.86 | 82.4 | 92.9 | 122.9 | 58.96 | 46.65 | 42.71 | | **A2** | Arm A (base 61250ca018, WITH all 11 PRs incl. #27253, #27254, #27270, #27271, #27273) | **12.30** | **81.0** | **87.3** | **108.8** | **55.66** | **45.71** | **42.24** | | **B2** | Arm B (base 61250ca018, MINUS #27253, #27254, #27270, #27271, #27273) | 11.65 | 84.7 | 94.1 | 124.8 | 61.69 | 47.32 | 43.45 | | **Arm A avg** | **Full stack (WITH all 11 PRs)** | **12.15** | **81.5** | **88.9** | **113.4** | **57.12** | **45.96** | **42.20** | | **Arm B avg** | **Minus #27253, #27254, #27270, #27271, #27273** | **11.76** | **83.5** | **93.5** | **123.9** | **60.33** | **46.98** | **43.08** | | **Effect of the 5 PRs (A vs B)** | — | **`+0.39 FPS` (`+3.3%`)** | **`-2.1 ms`** | **`-4.6 ms`** | **`-10.5 ms`** | **`-3.21 ms/f`** | **`-1.02 ms/f`** | **`-0.88 ms/f`** | Removing those 5 PRs hurt every run (`A1 > B1` and `A2 > B2` across all metrics), showing that their single-run isolated dips on c032ba7c52 were within `±0.25 FPS` scene variance while larger bottlenecks (#27268, #27249, #27252, #20130, #18757) still dominated. Individual PR captures above remain isolated against c032ba7c52. Not tested: NVIDIA/Intel GPUs, fresh Lies of P capture on rebased 929d09c8cb (captures above are from 6de3ab3d71; JJenkx also ran 6de3ab3d71 on Insomnis PPSA06829 on Linux/RADV RX 6650 XT with no crashes and overlapping 9.52 vs 9.81 FPS arms). ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: AMD Radeon RX 6800 (vendor=0x1002, device=0x73bf), AMD proprietary driver 26.10.1 (Windows driver 32.0.21045.16010, Vulkan 1.4.315), Windows 11 Pro (build 26300); Khronos validation layer on `main` 0af6efad52 and this change, 0 VUIDs - [x] AI-assisted: yes
MarcZX10 commented 2026-11-25 18:04:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T18:04:08Z.

Review: COMMENTED


Reviewed — no blocking findings

The changed code and its directly relevant import and recorder implementations were read at head 6de3ab3d71a11254bca04209c3ac3213c80e6e36; no checks were run in this reader-only environment.

What I ran

Read the prepared diff and targeted source context at the exact head above using repo_read.py. No build or tests were run.

Results

Check Result Note
Changed code review passed Both changed files and relevant implementations read
Automated checks not run Reader access only
Negative control not run Could not run tests here

Findings

Blocking

None.

Non-blocking

None.

Not verified

Builds, tests, and runtime behavior were not verified in this session. The author reports Windows unit tests and console measurements in the PR description; these were not independently run. Both changed files listed in the manifest were read. No changed files were excluded from review.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6062567499 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/27269#pullrequestreview-6062567499). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T18:04:08Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The changed code and its directly relevant import and recorder implementations were read at head `6de3ab3d71a11254bca04209c3ac3213c80e6e36`; no checks were run in this reader-only environment. ## What I ran Read the prepared diff and targeted source context at the exact head above using `repo_read.py`. No build or tests were run. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | Both changed files and relevant implementations read | | Automated checks | not run | Reader access only | | Negative control | not run | Could not run tests here | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Builds, tests, and runtime behavior were not verified in this session. The author reports Windows unit tests and console measurements in the PR description; these were not independently run. Both changed files listed in the manifest were read. No changed files were excluded from review. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-26 11:14:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T11:14:06Z.

Review: APPROVED


Reviewed — looks good

The reviewed change at head 929d09c8cbb2fa5f2c1b3dde4d9786134f7629c6 has no verified blocking defect; its runtime and performance claims remain only partly verified from the available code review.

What I ran

No build or tests were run. I inspected the prepared diff and targeted code at the pinned head.

Results

Check Result Note
Diff and changed function passed Inspected the full changed function and helper behavior
Build and tests not run Author-reported results only
Performance captures not run Author-reported results only

Findings

Blocking

None.

Non-blocking

None.

Not verified

  • The only changed repository file, core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp, was read around the changed function. Its full text was excluded from the prepared bundle due to size; other portions were not reviewed.
  • I did not verify the reported build, test runs, performance measurements, or behavior on physical console hardware. The description reports tests on Windows with an AMD RX 6800 and notes NVIDIA/Intel GPUs and a fresh capture on the rebased head were not tested.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6073159685 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/27269#pullrequestreview-6073159685). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-26T11:14:06Z. **Review:** APPROVED --- # Reviewed — looks good The reviewed change at head `929d09c8cbb2fa5f2c1b3dde4d9786134f7629c6` has no verified blocking defect; its runtime and performance claims remain only partly verified from the available code review. ## What I ran No build or tests were run. I inspected the prepared diff and targeted code at the pinned head. ## Results | Check | Result | Note | |---|---|---| | Diff and changed function | passed | Inspected the full changed function and helper behavior | | Build and tests | not run | Author-reported results only | | Performance captures | not run | Author-reported results only | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified - The only changed repository file, `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`, was read around the changed function. Its full text was excluded from the prepared bundle due to size; other portions were not reviewed. - I did not verify the reported build, test runs, performance measurements, or behavior on physical console hardware. The description reports tests on Windows with an AMD RX 6800 and notes NVIDIA/Intel GPUs and a fresh capture on the rebased head were not tested. ## To get this to a good state Nothing is required.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!27269
No description provided.