perf(agc): replace the indexed 16-byte copy kernel with a buffer copy #7968

Merged
saarthakpant merged 3 commits from upstream-pr/7968 into main 2026-10-23 12:30:12 +00:00
saarthakpant commented 2026-10-19 16:26:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by saarthakpant on 2026-10-19T16:26:48Z.


What

Unreal Engine 4 titles copy GPU buffers with a compute kernel that moves 16-byte elements from a source V# to a destination V#, with the element count and the source and destination offsets in a one-record constant buffer. The copy HLE knew two other copy kernels (the hashed dword copy and the stream copy) but not this one, so it ran as a real dispatch: 64-thread groups, one 16-byte load and store per thread, over host-imported guest memory. On Ghostrunner 2 (PPSA09911) that was about 28 ms of GPU time per dispatch, four dispatches per frame.

MatchesIndexedCopyKernel recognises the kernel by its 19 instruction words and the descriptors (stride 16, not swizzled, no add-tid, raw out-of-bounds mode, type 0, equal word 3 on source and destination, a record descriptor of stride 16 with at least one record). IndexedCopyRange reads {count, sourceOffset, destinationOffset} from the record, clamps the count to the launched threads, refuses windows past either descriptor's records, copies above 16 MiB and unaligned bases, and Driver::copyBuffer then takes the same path as the other kernels (the record is read only when nothing is pending over it, and the copy goes through VulkanDevice::CopyBuffer with the existing CPU and GPU limits, overlap and label checks). The two dispatch call sites treat the kernel like the other copy kernels.

Tested

Windows 11 (10.0.26200), MinGW-w64 GCC 15.2.0 UCRT, Release.

  • New agc_driver_indexed_copy: the kernel matches; every one-word alteration, a truncated kernel, other strides, a swizzled descriptor, differing formats, add-tid, raw out-of-bounds, another descriptor type, an empty record descriptor, another user-SGPR count, 32-thread groups and a dispatch without the group id do not; range arithmetic with offsets, count below and above the launch, windows past the records, 0 elements, 0 groups, 16 MiB accepted and above refused, misaligned bases refused; eight dispatches over real memory, five taking the HLE path and three (windows past the records, above 16 MiB) running the kernel, all with the expected destination contents.
  • agc_driver_indexed_copy_gpu_parameters (from eliasbruno124-dev's review): an address-based dispatch writes the copy's record in the same submission; the HLE now waits for leased writers (FinishLeaseWork, as readDispatchArguments does) before reading it. Failed at destination word 16 before the wait, passes with it.
  • agc_driver_stream_copy, agc_driver_indexed_copy and agc_driver_indexed_copy_gpu_parameters with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 (ctest -V) on main (stream copy only, the other two are new) and on this branch: all pass, the layer was found, no VUID- lines in either log.
  • Ghostrunner 2 (PPSA09911): the kernel at program 0x200e100000 now goes through the copy HLE; its GPU time per dispatch fell from about 28 ms to about 1.3 ms.

Performance, same machine, same session, warm caches, idle in-game scene (death screen), APS5_TRACE_SECONDS=120:60, no other switches. The base is main 4b462ef60 plus #7687, because main alone stops this title before gameplay (#7017); this change does not depend on #7687.

main + #7687 (db0cb30aa):

{"commit":"db0cb30aaaad","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:60"},"gpu":"NVIDIA GeForce RTX 2060 SUPER","driver":"NVIDIA 617.42","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 120:60","first_present":1166,"ms":60247.923},"presents":188,"frame_ms":{"p50":309.886,"p90":336.916,"p99":594.174,"max":595.994},"gpu_busy_ms_per_present":208.564,"worker_busy_pct":{"queue worker 0x0":98.983,"queue worker 0x20":99.495},"top_phases_ms_per_frame":{"Driver.Packet":632.832,"Driver.Packet.memory_wait":315.737,"Resources.Complete":148.403,"Graphics.Draw":143.937,"Graphics.Draw.draw_and_resource_release":125.999,"Driver.Packet.draw":124.129,"Driver.Draw":123.192,"Driver.Packet.dispatch":105.326},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":13.457,"events_lost":931329,"totals_full":false},"draw committer":{"events_full_after_s":28.593,"events_lost":290723,"totals_full":false}},"trace":"aps5-trace-db0cb30aaaad-10428.json.gz"}

this change (7d798795d):

{"commit":"7d798795d78c","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:60"},"gpu":"NVIDIA GeForce RTX 2060 SUPER","driver":"NVIDIA 617.42","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 120:60","first_present":1246,"ms":60258.336},"presents":175,"frame_ms":{"p50":306.110,"p90":394.146,"p99":745.884,"max":4203.981},"gpu_busy_ms_per_present":96.262,"worker_busy_pct":{"queue worker 0x0":98.372,"queue worker 0x20":99.384},"top_phases_ms_per_frame":{"Driver.Packet":679.618,"Driver.Packet.memory_wait":336.187,"Graphics.Draw":160.820,"Driver.Packet.draw":149.034,"Driver.Draw":147.289,"Graphics.Draw.draw_and_resource_release":119.477,"Driver.Packet.device_lock":109.898,"Driver.Draw.shader_compile_and_link":78.745},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":9.388,"events_lost":1909697,"totals_full":false},"draw committer":{"events_full_after_s":24.118,"events_lost":418959,"totals_full":false}},"trace":"aps5-trace-7d798795d78c-13420.json.gz"}

GPU busy per present 208.6 ms → 96.3 ms. The frame time does not move (p50 309.9 → 306.1 ms): both queue workers stay at 99 %, and the compute queue spends most of each frame in Driver.Packet.memory_wait on labels the graphics queue writes, so this title is bound by that path, not by the GPU. The max of 4204 ms in the second capture is one shader compile at the start of the window (Driver.Draw.shader_compile_and_link). Both traces are attached; their event buffers filled after 13 s and 9 s of the window (trace_dropped), the summary counters are complete.

Digest of each trace: python3 tools/trace_digest.py <trace> output attached as digest-base.txt and digest-change.txt.

tools/pr_overlap.py reports no open pull request changing the same lines. It could not compare eight pull requests that conflict with main and touch the same files: #6292 and #6615 change the type of countsMutex in BufferCopy.cpp; #5925, #7201, #7233, #7332, #7446 and #7642 change other parts of Dispatch.cpp. None of them touches the copy-kernel recognition.

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
  • 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: PPSA09911 #9679
  • GPUs tested: NVIDIA GeForce RTX 2060 SUPER, driver 617.42, Windows 11 10.0.26200 (Khronos validation layer 1.4.363)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4924067412 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7968). Originally posted by [saarthakpant](https://github.com/saarthakpant) on 2026-10-19T16:26:48Z. --- ### What Unreal Engine 4 titles copy GPU buffers with a compute kernel that moves 16-byte elements from a source V# to a destination V#, with the element count and the source and destination offsets in a one-record constant buffer. The copy HLE knew two other copy kernels (the hashed dword copy and the stream copy) but not this one, so it ran as a real dispatch: 64-thread groups, one 16-byte load and store per thread, over host-imported guest memory. On Ghostrunner 2 (PPSA09911) that was about 28 ms of GPU time per dispatch, four dispatches per frame. `MatchesIndexedCopyKernel` recognises the kernel by its 19 instruction words and the descriptors (stride 16, not swizzled, no add-tid, raw out-of-bounds mode, type 0, equal word 3 on source and destination, a record descriptor of stride 16 with at least one record). `IndexedCopyRange` reads `{count, sourceOffset, destinationOffset}` from the record, clamps the count to the launched threads, refuses windows past either descriptor's records, copies above 16 MiB and unaligned bases, and `Driver::copyBuffer` then takes the same path as the other kernels (the record is read only when nothing is pending over it, and the copy goes through `VulkanDevice::CopyBuffer` with the existing CPU and GPU limits, overlap and label checks). The two dispatch call sites treat the kernel like the other copy kernels. ### Tested Windows 11 (10.0.26200), MinGW-w64 GCC 15.2.0 UCRT, Release. - New `agc_driver_indexed_copy`: the kernel matches; every one-word alteration, a truncated kernel, other strides, a swizzled descriptor, differing formats, add-tid, raw out-of-bounds, another descriptor type, an empty record descriptor, another user-SGPR count, 32-thread groups and a dispatch without the group id do not; range arithmetic with offsets, count below and above the launch, windows past the records, 0 elements, 0 groups, 16 MiB accepted and above refused, misaligned bases refused; eight dispatches over real memory, five taking the HLE path and three (windows past the records, above 16 MiB) running the kernel, all with the expected destination contents. - `agc_driver_indexed_copy_gpu_parameters` (from eliasbruno124-dev's review): an address-based dispatch writes the copy's record in the same submission; the HLE now waits for leased writers (`FinishLeaseWork`, as `readDispatchArguments` does) before reading it. Failed at destination word 16 before the wait, passes with it. - `agc_driver_stream_copy`, `agc_driver_indexed_copy` and `agc_driver_indexed_copy_gpu_parameters` with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1` (`ctest -V`) on `main` (stream copy only, the other two are new) and on this branch: all pass, the layer was found, no `VUID-` lines in either log. - Ghostrunner 2 (PPSA09911): the kernel at program 0x200e100000 now goes through the copy HLE; its GPU time per dispatch fell from about 28 ms to about 1.3 ms. Performance, same machine, same session, warm caches, idle in-game scene (death screen), `APS5_TRACE_SECONDS=120:60`, no other switches. The base is `main` 4b462ef60 plus #7687, because `main` alone stops this title before gameplay (#7017); this change does not depend on #7687. main + #7687 (db0cb30aa): ```json {"commit":"db0cb30aaaad","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:60"},"gpu":"NVIDIA GeForce RTX 2060 SUPER","driver":"NVIDIA 617.42","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 120:60","first_present":1166,"ms":60247.923},"presents":188,"frame_ms":{"p50":309.886,"p90":336.916,"p99":594.174,"max":595.994},"gpu_busy_ms_per_present":208.564,"worker_busy_pct":{"queue worker 0x0":98.983,"queue worker 0x20":99.495},"top_phases_ms_per_frame":{"Driver.Packet":632.832,"Driver.Packet.memory_wait":315.737,"Resources.Complete":148.403,"Graphics.Draw":143.937,"Graphics.Draw.draw_and_resource_release":125.999,"Driver.Packet.draw":124.129,"Driver.Draw":123.192,"Driver.Packet.dispatch":105.326},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":13.457,"events_lost":931329,"totals_full":false},"draw committer":{"events_full_after_s":28.593,"events_lost":290723,"totals_full":false}},"trace":"aps5-trace-db0cb30aaaad-10428.json.gz"} ``` this change (7d798795d): ```json {"commit":"7d798795d78c","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:60"},"gpu":"NVIDIA GeForce RTX 2060 SUPER","driver":"NVIDIA 617.42","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 120:60","first_present":1246,"ms":60258.336},"presents":175,"frame_ms":{"p50":306.110,"p90":394.146,"p99":745.884,"max":4203.981},"gpu_busy_ms_per_present":96.262,"worker_busy_pct":{"queue worker 0x0":98.372,"queue worker 0x20":99.384},"top_phases_ms_per_frame":{"Driver.Packet":679.618,"Driver.Packet.memory_wait":336.187,"Graphics.Draw":160.820,"Driver.Packet.draw":149.034,"Driver.Draw":147.289,"Graphics.Draw.draw_and_resource_release":119.477,"Driver.Packet.device_lock":109.898,"Driver.Draw.shader_compile_and_link":78.745},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":9.388,"events_lost":1909697,"totals_full":false},"draw committer":{"events_full_after_s":24.118,"events_lost":418959,"totals_full":false}},"trace":"aps5-trace-7d798795d78c-13420.json.gz"} ``` GPU busy per present 208.6 ms → 96.3 ms. The frame time does not move (p50 309.9 → 306.1 ms): both queue workers stay at 99 %, and the compute queue spends most of each frame in `Driver.Packet.memory_wait` on labels the graphics queue writes, so this title is bound by that path, not by the GPU. The max of 4204 ms in the second capture is one shader compile at the start of the window (`Driver.Draw.shader_compile_and_link`). Both traces are attached; their event buffers filled after 13 s and 9 s of the window (`trace_dropped`), the summary counters are complete. Digest of each trace: `python3 tools/trace_digest.py <trace>` output attached as `digest-base.txt` and `digest-change.txt`. `tools/pr_overlap.py` reports no open pull request changing the same lines. It could not compare eight pull requests that conflict with `main` and touch the same files: #6292 and #6615 change the type of `countsMutex` in `BufferCopy.cpp`; #5925, #7201, #7233, #7332, #7446 and #7642 change other parts of `Dispatch.cpp`. None of them touches the copy-kernel recognition. ### 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) - [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: PPSA09911 #9679 - [x] GPUs tested: NVIDIA GeForce RTX 2060 SUPER, driver 617.42, Windows 11 10.0.26200 (Khronos validation layer 1.4.363) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-19 16:46:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T16:46:00Z.

Review: COMMENTED


I reviewed the matcher and range checks. The HLE is restricted to the exact instruction sequence, descriptor layout, launch shape and record format; record visibility, pending labels, descriptor bounds, overlap and the 16 MiB cap are checked before the shared copy path runs. The test fixture also compares actual destination contents for both HLE and rejected-kernel cases. The performance report distinguishes the GPU-time reduction from the unchanged frame-time bottleneck. I did not independently run the Windows tests or title capture.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5574780749 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7968#pullrequestreview-5574780749). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-19T16:46:00Z. **Review:** COMMENTED --- I reviewed the matcher and range checks. The HLE is restricted to the exact instruction sequence, descriptor layout, launch shape and record format; record visibility, pending labels, descriptor bounds, overlap and the 16 MiB cap are checked before the shared copy path runs. The test fixture also compares actual destination contents for both HLE and rejected-kernel cases. The performance report distinguishes the GPU-time reduction from the unchanged frame-time bottleneck. I did not independently run the Windows tests or title capture.
eliasbruno124-dev commented 2026-10-19 17:27:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by eliasbruno124-dev on 2026-10-19T17:27:36Z.


I reproduced a parameter-visibility failure in 1a6b03bc1, applied unchanged to main dbac9fa15.

An address-based GPU dispatch writes {count=23, sourceOffset=17, destinationOffset=29}, followed by this indexed copy in the same submission. The record initially contains {1, 0, 0}. The producer is deferred, and the HLE reads the old parameters: the regression reports GPU parameter copy differs at word 16. It also verifies that the producer eventually wrote all three expected values, so the failure is in the dependent copy.

Calling Graphics::FinishLeaseWork() before reading the indexed record, under the existing GPU lock, fixes this case. The existing snapshot/texture/label checks remain in place. The wait finishes the newest leased batch, so its performance cost still needs measurement.

Minimal correction and standalone regression are available for reuse; that single commit adds the wait, its include and IndexedCopyGpuParameters.cpp. I have not opened a competing PR for the kernel.

Check Result
Your original IndexedCopy and StreamCopy tests 2 passed
Added GPU-parameter regression before the correction Failed at destination word 16
Same regression with APS5_NO_COPY_HLE=1 Passed
IndexedCopy, StreamCopy and the regression after the correction 3 passed

Windows 11 10.0.26300, GCC 15.2.0 UCRT, Release, NVIDIA RTX 3060 Laptop GPU, driver 617.42. All runs used ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and the actually loaded Khronos validation layer, with zero skips and zero VUID- lines. The corrected tests took 15.31 s, 15.06 s and 0.64 s respectively. Conventions and whitespace checks pass. Linux and other GPU vendors were not tested, and this is a correctness regression, not a title-performance claim.

Prepared with AI assistance.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6273151803 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7968#issuecomment-6273151803). Originally posted by [eliasbruno124-dev](https://github.com/eliasbruno124-dev) on 2026-10-19T17:27:36Z. --- I reproduced a parameter-visibility failure in `1a6b03bc1`, applied unchanged to main `dbac9fa15`. An address-based GPU dispatch writes `{count=23, sourceOffset=17, destinationOffset=29}`, followed by this indexed copy in the same submission. The record initially contains `{1, 0, 0}`. The producer is deferred, and the HLE reads the old parameters: the regression reports `GPU parameter copy differs at word 16`. It also verifies that the producer eventually wrote all three expected values, so the failure is in the dependent copy. Calling `Graphics::FinishLeaseWork()` before reading the indexed record, under the existing GPU lock, fixes this case. The existing snapshot/texture/label checks remain in place. The wait finishes the newest leased batch, so its performance cost still needs measurement. [Minimal correction and standalone regression](https://github.com/eliasbruno124-dev/AnyPS5/commit/1b2d6c53a1adc6a6c4dcb77cd04eaa83301ec6be) are available for reuse; that single commit adds the wait, its include and `IndexedCopyGpuParameters.cpp`. I have not opened a competing PR for the kernel. | Check | Result | | --- | --- | | Your original IndexedCopy and StreamCopy tests | 2 passed | | Added GPU-parameter regression before the correction | Failed at destination word 16 | | Same regression with `APS5_NO_COPY_HLE=1` | Passed | | IndexedCopy, StreamCopy and the regression after the correction | 3 passed | Windows 11 10.0.26300, GCC 15.2.0 UCRT, Release, NVIDIA RTX 3060 Laptop GPU, driver 617.42. All runs used `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and the actually loaded Khronos validation layer, with zero skips and zero `VUID-` lines. The corrected tests took 15.31 s, 15.06 s and 0.64 s respectively. Conventions and whitespace checks pass. Linux and other GPU vendors were not tested, and this is a correctness regression, not a title-performance claim. Prepared with AI assistance.
saarthakpant commented 2026-10-19 19:36:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by saarthakpant on 2026-10-19T19:36:39Z.


Thanks for the reproduction and the fix. You are right: the record checks covered snapshot writes, pending storage results and labels, but not a deferred address-based batch that writes the record, and the indirect-dispatch path already waits for exactly that (readDispatchArguments calls FinishLeaseWork before reading the arguments).

Your commit is on the branch as it is (c60f65539, your authorship kept). On Windows 11 (10.0.26200), RTX 2060 SUPER, NVIDIA 617.42, GCC 15.2.0, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (ctest -V): agc_driver_indexed_copy, agc_driver_indexed_copy_gpu_parameters and agc_driver_stream_copy pass (7.9 s, 1.6 s, 8.5 s), the layer was found, no VUID- lines.

On the cost: FinishLeaseWork returns at once unless an address-based batch is newer than what the recorder has completed, so it only waits while such a batch is in flight. I have not got a clean A/B on Ghostrunner 2 yet (the one run I made was not the same scene as the baseline); I will add one when I have it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6275642504 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7968#issuecomment-6275642504). Originally posted by [saarthakpant](https://github.com/saarthakpant) on 2026-10-19T19:36:39Z. --- Thanks for the reproduction and the fix. You are right: the record checks covered snapshot writes, pending storage results and labels, but not a deferred address-based batch that writes the record, and the indirect-dispatch path already waits for exactly that (`readDispatchArguments` calls `FinishLeaseWork` before reading the arguments). Your commit is on the branch as it is (c60f65539, your authorship kept). On Windows 11 (10.0.26200), RTX 2060 SUPER, NVIDIA 617.42, GCC 15.2.0, with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (`ctest -V`): `agc_driver_indexed_copy`, `agc_driver_indexed_copy_gpu_parameters` and `agc_driver_stream_copy` pass (7.9 s, 1.6 s, 8.5 s), the layer was found, no `VUID-` lines. On the cost: `FinishLeaseWork` returns at once unless an address-based batch is newer than what the recorder has completed, so it only waits while such a batch is in flight. I have not got a clean A/B on Ghostrunner 2 yet (the one run I made was not the same scene as the baseline); I will add one when I have it.
saarthakpant commented 2026-10-19 19:54:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by saarthakpant on 2026-10-19T19:54:05Z.


Cost of the wait on Ghostrunner 2 (PPSA09911), RTX 2060 SUPER, NVIDIA 617.42, Windows 11 (10.0.26200): no measurable cost.

Two runs of the same build (local base: main 4b462ef60 + #7687 + #5372 + this branch, with and without c60f65539), identical scripted input (Space through the loading screen, then a fixed key cycle with the respawn key), APS5_PROFILE_GPU=1 APS5_PROFILE_DRAW=1, 26 ten-second windows each. Scripted runs still die and respawn at different moments, so the windows are matched by GPU load rather than compared end to end:

GPU busy per frame without the wait: windows, presents / 10 s with the wait: windows, presents / 10 s
60–85 ms 10, 32.0 6, 30.5
85–100 ms 7, 25.0 4, 25.0
100–120 ms 3, 19.0 7, 22.0
120–220 ms 6, 21.5 8, 16.0

The recorder's totals over each run: 8,758 syncs waiting 17.1 s for the GPU without the wait, 7,822 syncs waiting 16.5 s with it (the other and address-based sources, where this wait would count, went from 31 / 0.5 s and 11 / 0.1 s to 27 / 0.4 s and 2 / 0.0 s). 1,110 and 902 indexed copies went through the HLE in the two runs, all on the GPU path. So on this title the wait almost never has a newer address-based batch to finish, and the frame rate at equal GPU load is the same within run-to-run noise.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6275966787 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7968#issuecomment-6275966787). Originally posted by [saarthakpant](https://github.com/saarthakpant) on 2026-10-19T19:54:05Z. --- Cost of the wait on Ghostrunner 2 (PPSA09911), RTX 2060 SUPER, NVIDIA 617.42, Windows 11 (10.0.26200): no measurable cost. Two runs of the same build (local base: `main` 4b462ef60 + #7687 + #5372 + this branch, with and without c60f65539), identical scripted input (Space through the loading screen, then a fixed key cycle with the respawn key), `APS5_PROFILE_GPU=1 APS5_PROFILE_DRAW=1`, 26 ten-second windows each. Scripted runs still die and respawn at different moments, so the windows are matched by GPU load rather than compared end to end: | GPU busy per frame | without the wait: windows, presents / 10 s | with the wait: windows, presents / 10 s | |---|---|---| | 60–85 ms | 10, 32.0 | 6, 30.5 | | 85–100 ms | 7, 25.0 | 4, 25.0 | | 100–120 ms | 3, 19.0 | 7, 22.0 | | 120–220 ms | 6, 21.5 | 8, 16.0 | The recorder's totals over each run: 8,758 syncs waiting 17.1 s for the GPU without the wait, 7,822 syncs waiting 16.5 s with it (the `other` and `address-based` sources, where this wait would count, went from 31 / 0.5 s and 11 / 0.1 s to 27 / 0.4 s and 2 / 0.0 s). 1,110 and 902 indexed copies went through the HLE in the two runs, all on the GPU path. So on this title the wait almost never has a newer address-based batch to finish, and the frame rate at equal GPU load is the same within run-to-run noise.
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!7968
No description provided.