perf(agc): find a draw's highest index with a loop the compiler vectorizes #8567

Merged
imellag merged 1 commit from upstream-pr/8567 into main 2026-10-20 21:54:22 +00:00
imellag commented 2026-10-20 16:48:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by imellag on 2026-10-20T16:48:14Z.


What

HighestDrawIndex (VertexInput.hpp) read every index through a branch on the index size and kept the maximum in a std::optional, so neither clang nor GCC vectorized it. An indexed draw scans its whole index range whenever the range is not kept (fewer than Recorder::KeptIndexRangeIndices indices, or memory that is not tracked), so the draw committer pays this loop on most small draws. The scan now runs one loop per index type: the plain maximum without primitive restart, and with restart the maximum of the indices masked by "is not the restart index", plus an OR of those masks for "some index was not a restart index". Results are unchanged. highestDrawIndexTests in tests/Graphics.cpp gains cases for an empty range, long ranges, indices above 2^31, and an unaligned range with a trailing byte.

Tested

  • Apple M4 Pro, macOS 27.0.1, x86-64 under Rosetta 2, Apple clang 21.0.0. On main 5f7aa5570 the libraries do not build on macOS, so there tests/Graphics.cpp was only compiled against this header. agc_driver_graphics was run on the macOS integration head 7cf8c610c (former #7332) with this commit: it passes, and a negative control (dropping the last index of ranges of 2048 bytes or more) makes it fail.
  • Old and new loop compared on 800k random ranges (u16/u32, with and without restart, random lengths and alignments): identical results with Apple clang and with GCC 14 -O3 at baseline x86-64. GCC vectorizes all four loops (SSE2); the old loop stays scalar.
  • Speed: Planet of Lana (PPSA19450), standing still in the village after a restored save, 3840x2160, warm caches, APS5_TRACE_SECONDS=140:10 only, base and change alternated twice in one session. The base is 7cf8c610c and not main because titles do not run from main on macOS. Frame times do not change (this scene is paced by the queue worker and the GPU); the draw committer is busy about 1 ms less per frame:
capture commit presents frame p50 (ms) draw committer busy (ms/frame) queue worker busy (ms/frame) trace
base 1 7cf8c610c 274 36.6 9.2 11.0 1-base-1-aps5-trace-7cf8c610c6a7-32751.json.gz
change 1 91f4eee41 273 36.6 8.0 10.9 2-change-1-aps5-trace-91f4eee41c3a-34344.json.gz
base 2 7cf8c610c 272 36.8 8.8 11.2 3-base-2-aps5-trace-7cf8c610c6a7-35951.json.gz
change 2 91f4eee41 273 36.6 8.1 10.9 4-change-2-aps5-trace-91f4eee41c3a-37509.json.gz
Summary lines
{"commit":"7cf8c610c6a7","dirty":false,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"140:10"},"gpu":"Apple M4 Pro","driver":"MoltenVK 1.4.2","os":"Darwin 27.0.0","resolution":"3840x2160","window":{"spec":"seconds 140:10","first_present":5389,"ms":10035.459},"presents":274,"frame_ms":{"p50":36.557,"p90":38.545,"p99":40.220,"max":53.655},"gpu_busy_ms_per_present":24.073,"worker_busy_pct":{"queue worker 0x0":66.038},"top_phases_ms_per_frame":{"Driver.Packet":23.966,"Driver.Packet.draw":19.447,"Driver.Draw":19.268,"Graphics.Draw":14.320,"Driver.Draw.shader_compile_and_link":12.695,"VideoOut.Flip":12.042,"Driver.Present":11.251,"VideoOut.Flip.present":11.209},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.694,"events_lost":197837,"totals_full":false}},"trace":"aps5-trace-7cf8c610c6a7-32751.json.gz"}
{"commit":"91f4eee41c3a","dirty":false,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"140:10"},"gpu":"Apple M4 Pro","driver":"MoltenVK 1.4.2","os":"Darwin 27.0.0","resolution":"3840x2160","window":{"spec":"seconds 140:10","first_present":5111,"ms":10021.607},"presents":273,"frame_ms":{"p50":36.615,"p90":38.592,"p99":40.238,"max":54.560},"gpu_busy_ms_per_present":24.941,"worker_busy_pct":{"queue worker 0x0":63.308},"top_phases_ms_per_frame":{"Driver.Packet":23.059,"Driver.Packet.draw":18.706,"Driver.Draw":18.536,"Graphics.Draw":13.020,"VideoOut.Flip":12.984,"Driver.Draw.shader_compile_and_link":12.381,"Driver.Present":12.189,"VideoOut.Flip.present":12.147},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.959,"events_lost":179914,"totals_full":false}},"trace":"aps5-trace-91f4eee41c3a-34344.json.gz"}
{"commit":"7cf8c610c6a7","dirty":false,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"140:10"},"gpu":"Apple M4 Pro","driver":"MoltenVK 1.4.2","os":"Darwin 27.0.0","resolution":"3840x2160","window":{"spec":"seconds 140:10","first_present":5411,"ms":10028.871},"presents":272,"frame_ms":{"p50":36.802,"p90":38.818,"p99":40.385,"max":52.498},"gpu_busy_ms_per_present":24.735,"worker_busy_pct":{"queue worker 0x0":64.834},"top_phases_ms_per_frame":{"Driver.Packet":23.692,"Driver.Packet.draw":19.131,"Driver.Draw":18.957,"Graphics.Draw":14.039,"Driver.Draw.shader_compile_and_link":12.509,"VideoOut.Flip":12.444,"Driver.Present":11.662,"VideoOut.Flip.present":11.621},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.856,"events_lost":187766,"totals_full":false}},"trace":"aps5-trace-7cf8c610c6a7-35951.json.gz"}
{"commit":"91f4eee41c3a","dirty":false,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"140:10"},"gpu":"Apple M4 Pro","driver":"MoltenVK 1.4.2","os":"Darwin 27.0.0","resolution":"3840x2160","window":{"spec":"seconds 140:10","first_present":5417,"ms":10025.576},"presents":273,"frame_ms":{"p50":36.582,"p90":38.703,"p99":41.163,"max":43.401},"gpu_busy_ms_per_present":24.823,"worker_busy_pct":{"queue worker 0x0":63.924},"top_phases_ms_per_frame":{"Driver.Packet":23.303,"Driver.Packet.draw":18.895,"Driver.Draw":18.725,"Graphics.Draw":13.170,"VideoOut.Flip":12.712,"Driver.Draw.shader_compile_and_link":12.437,"Driver.Present":11.928,"VideoOut.Flip.present":11.886},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.861,"events_lost":184759,"totals_full":false}},"trace":"aps5-trace-91f4eee41c3a-37509.json.gz"}

The queue worker's trace buffer filled after about 5.7 s in every capture (trace_dropped), so its column covers only that part of the window; the draw committer dropped nothing. The four traces are attached in a comment below. Linux and Windows were not run; the change is in a header shared by all hosts, so timings on real x86-64 hardware with GCC or MSVC are welcome.

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: none
  • GPUs tested: Apple M4 Pro, MoltenVK 1.4.2, macOS 27.0.1 (on 7cf8c610c; the change itself is CPU-only)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4939210560 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8567). Originally posted by [imellag](https://github.com/imellag) on 2026-10-20T16:48:14Z. --- ### What `HighestDrawIndex` (VertexInput.hpp) read every index through a branch on the index size and kept the maximum in a `std::optional`, so neither clang nor GCC vectorized it. An indexed draw scans its whole index range whenever the range is not kept (fewer than `Recorder::KeptIndexRangeIndices` indices, or memory that is not tracked), so the draw committer pays this loop on most small draws. The scan now runs one loop per index type: the plain maximum without primitive restart, and with restart the maximum of the indices masked by "is not the restart index", plus an OR of those masks for "some index was not a restart index". Results are unchanged. `highestDrawIndexTests` in tests/Graphics.cpp gains cases for an empty range, long ranges, indices above 2^31, and an unaligned range with a trailing byte. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> - Apple M4 Pro, macOS 27.0.1, x86-64 under Rosetta 2, Apple clang 21.0.0. On `main` 5f7aa5570 the libraries do not build on macOS, so there `tests/Graphics.cpp` was only compiled against this header. `agc_driver_graphics` was run on the macOS integration head 7cf8c610c (former #7332) with this commit: it passes, and a negative control (dropping the last index of ranges of 2048 bytes or more) makes it fail. - Old and new loop compared on 800k random ranges (u16/u32, with and without restart, random lengths and alignments): identical results with Apple clang and with GCC 14 `-O3` at baseline x86-64. GCC vectorizes all four loops (SSE2); the old loop stays scalar. - Speed: Planet of Lana (PPSA19450), standing still in the village after a restored save, 3840x2160, warm caches, `APS5_TRACE_SECONDS=140:10` only, base and change alternated twice in one session. The base is 7cf8c610c and not `main` because titles do not run from `main` on macOS. Frame times do not change (this scene is paced by the queue worker and the GPU); the draw committer is busy about 1 ms less per frame: | capture | commit | presents | frame p50 (ms) | draw committer busy (ms/frame) | queue worker busy (ms/frame) | trace | |---|---|---|---|---|---|---| | base 1 | 7cf8c610c | 274 | 36.6 | 9.2 | 11.0 | [1-base-1-aps5-trace-7cf8c610c6a7-32751.json.gz](https://github.com/user-attachments/files/33729735/1-base-1-aps5-trace-7cf8c610c6a7-32751.json.gz) | | change 1 | 91f4eee41 | 273 | 36.6 | 8.0 | 10.9 | [2-change-1-aps5-trace-91f4eee41c3a-34344.json.gz](https://github.com/user-attachments/files/33729739/2-change-1-aps5-trace-91f4eee41c3a-34344.json.gz) | | base 2 | 7cf8c610c | 272 | 36.8 | 8.8 | 11.2 | [3-base-2-aps5-trace-7cf8c610c6a7-35951.json.gz](https://github.com/user-attachments/files/33729742/3-base-2-aps5-trace-7cf8c610c6a7-35951.json.gz) | | change 2 | 91f4eee41 | 273 | 36.6 | 8.1 | 10.9 | [4-change-2-aps5-trace-91f4eee41c3a-37509.json.gz](https://github.com/user-attachments/files/33729743/4-change-2-aps5-trace-91f4eee41c3a-37509.json.gz) | <details><summary>Summary lines</summary> ```json {"commit":"7cf8c610c6a7","dirty":false,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"140:10"},"gpu":"Apple M4 Pro","driver":"MoltenVK 1.4.2","os":"Darwin 27.0.0","resolution":"3840x2160","window":{"spec":"seconds 140:10","first_present":5389,"ms":10035.459},"presents":274,"frame_ms":{"p50":36.557,"p90":38.545,"p99":40.220,"max":53.655},"gpu_busy_ms_per_present":24.073,"worker_busy_pct":{"queue worker 0x0":66.038},"top_phases_ms_per_frame":{"Driver.Packet":23.966,"Driver.Packet.draw":19.447,"Driver.Draw":19.268,"Graphics.Draw":14.320,"Driver.Draw.shader_compile_and_link":12.695,"VideoOut.Flip":12.042,"Driver.Present":11.251,"VideoOut.Flip.present":11.209},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.694,"events_lost":197837,"totals_full":false}},"trace":"aps5-trace-7cf8c610c6a7-32751.json.gz"} {"commit":"91f4eee41c3a","dirty":false,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"140:10"},"gpu":"Apple M4 Pro","driver":"MoltenVK 1.4.2","os":"Darwin 27.0.0","resolution":"3840x2160","window":{"spec":"seconds 140:10","first_present":5111,"ms":10021.607},"presents":273,"frame_ms":{"p50":36.615,"p90":38.592,"p99":40.238,"max":54.560},"gpu_busy_ms_per_present":24.941,"worker_busy_pct":{"queue worker 0x0":63.308},"top_phases_ms_per_frame":{"Driver.Packet":23.059,"Driver.Packet.draw":18.706,"Driver.Draw":18.536,"Graphics.Draw":13.020,"VideoOut.Flip":12.984,"Driver.Draw.shader_compile_and_link":12.381,"Driver.Present":12.189,"VideoOut.Flip.present":12.147},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.959,"events_lost":179914,"totals_full":false}},"trace":"aps5-trace-91f4eee41c3a-34344.json.gz"} {"commit":"7cf8c610c6a7","dirty":false,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"140:10"},"gpu":"Apple M4 Pro","driver":"MoltenVK 1.4.2","os":"Darwin 27.0.0","resolution":"3840x2160","window":{"spec":"seconds 140:10","first_present":5411,"ms":10028.871},"presents":272,"frame_ms":{"p50":36.802,"p90":38.818,"p99":40.385,"max":52.498},"gpu_busy_ms_per_present":24.735,"worker_busy_pct":{"queue worker 0x0":64.834},"top_phases_ms_per_frame":{"Driver.Packet":23.692,"Driver.Packet.draw":19.131,"Driver.Draw":18.957,"Graphics.Draw":14.039,"Driver.Draw.shader_compile_and_link":12.509,"VideoOut.Flip":12.444,"Driver.Present":11.662,"VideoOut.Flip.present":11.621},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.856,"events_lost":187766,"totals_full":false}},"trace":"aps5-trace-7cf8c610c6a7-35951.json.gz"} {"commit":"91f4eee41c3a","dirty":false,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"140:10"},"gpu":"Apple M4 Pro","driver":"MoltenVK 1.4.2","os":"Darwin 27.0.0","resolution":"3840x2160","window":{"spec":"seconds 140:10","first_present":5417,"ms":10025.576},"presents":273,"frame_ms":{"p50":36.582,"p90":38.703,"p99":41.163,"max":43.401},"gpu_busy_ms_per_present":24.823,"worker_busy_pct":{"queue worker 0x0":63.924},"top_phases_ms_per_frame":{"Driver.Packet":23.303,"Driver.Packet.draw":18.895,"Driver.Draw":18.725,"Graphics.Draw":13.170,"VideoOut.Flip":12.712,"Driver.Draw.shader_compile_and_link":12.437,"Driver.Present":11.928,"VideoOut.Flip.present":11.886},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.861,"events_lost":184759,"totals_full":false}},"trace":"aps5-trace-91f4eee41c3a-37509.json.gz"} ``` </details> The queue worker's trace buffer filled after about 5.7 s in every capture (`trace_dropped`), so its column covers only that part of the window; the draw committer dropped nothing. The four traces are attached in a comment below. Linux and Windows were not run; the change is in a header shared by all hosts, so timings on real x86-64 hardware with GCC or MSVC are welcome. ### 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: none - [x] GPUs tested: Apple M4 Pro, MoltenVK 1.4.2, macOS 27.0.1 (on 7cf8c610c; the change itself is CPU-only) - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-20 17:04:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T17:04:15Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1395 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5441 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5499 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6146 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6188 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6194 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6235 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6280 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6481 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6548 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6636 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6683 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6804 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6970 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7085 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7256 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6296520849 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8567#issuecomment-6296520849). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-20T17:04:15Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 4040](https://www.github.com/boykopovar/AnyPS5/pull/4040) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5441](https://www.github.com/boykopovar/AnyPS5/pull/5441) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6146](https://www.github.com/boykopovar/AnyPS5/pull/6146) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6194](https://www.github.com/boykopovar/AnyPS5/pull/6194) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6636](https://www.github.com/boykopovar/AnyPS5/pull/6636) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6683](https://www.github.com/boykopovar/AnyPS5/pull/6683) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6804](https://www.github.com/boykopovar/AnyPS5/pull/6804) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6970](https://www.github.com/boykopovar/AnyPS5/pull/6970) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 7085](https://www.github.com/boykopovar/AnyPS5/pull/7085) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 7256](https://www.github.com/boykopovar/AnyPS5/pull/7256) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` |
imellag commented 2026-10-20 17:12:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by imellag on 2026-10-20T17:12:21Z.


Traces of the four captures in the table above, in the same order (each file name matches the trace field of its summary line):

1-base-1-aps5-trace-7cf8c610c6a7-32751.json.gz
2-change-1-aps5-trace-91f4eee41c3a-34344.json.gz
3-base-2-aps5-trace-7cf8c610c6a7-35951.json.gz
4-change-2-aps5-trace-91f4eee41c3a-37509.json.gz

They open in ui.perfetto.dev; python3 tools/trace_digest.py <trace> gives the per-thread table the draw committer numbers come from.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6296673100 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8567#issuecomment-6296673100). Originally posted by [imellag](https://github.com/imellag) on 2026-10-20T17:12:21Z. --- Traces of the four captures in the table above, in the same order (each file name matches the `trace` field of its summary line): [1-base-1-aps5-trace-7cf8c610c6a7-32751.json.gz](https://github.com/user-attachments/files/33729735/1-base-1-aps5-trace-7cf8c610c6a7-32751.json.gz) [2-change-1-aps5-trace-91f4eee41c3a-34344.json.gz](https://github.com/user-attachments/files/33729739/2-change-1-aps5-trace-91f4eee41c3a-34344.json.gz) [3-base-2-aps5-trace-7cf8c610c6a7-35951.json.gz](https://github.com/user-attachments/files/33729742/3-base-2-aps5-trace-7cf8c610c6a7-35951.json.gz) [4-change-2-aps5-trace-91f4eee41c3a-37509.json.gz](https://github.com/user-attachments/files/33729743/4-change-2-aps5-trace-91f4eee41c3a-37509.json.gz) They open in ui.perfetto.dev; `python3 tools/trace_digest.py <trace>` gives the per-thread table the draw committer numbers come from.
adriadam10 commented 2026-10-20 21:56:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-20T21:56:23Z.


Checked the restart masking and the kept OR against the old loop (empty range and all-restart ranges still return nullopt, no read past the range), the includes, and the new tests (empty, long u16/u32 ranges, indices above 2^31, unaligned range with trailing byte); merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6302578618 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8567#issuecomment-6302578618). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-20T21:56:23Z. --- Checked the restart masking and the `kept` OR against the old loop (empty range and all-restart ranges still return nullopt, no read past the range), the includes, and the new tests (empty, long u16/u32 ranges, indices above 2^31, unaligned range with trailing byte); merged.
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!8567
No description provided.