perf(shader): allocate a program's IR values in chunks #11798

Merged
milescoviello merged 2 commits from upstream-pr/11798 into main 2026-11-02 12:26:47 +00:00
milescoviello commented 2026-10-27 07:54:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-27T07:54:34Z.


What

IrProgram::CreateValue allocates every IR value separately with std::make_unique, and ~IrProgram frees them one at a time. On the Crimson Desert replay set it is the biggest allocator caller on main: 3.5 % of the profile's samples are in malloc under it, and another 2.2 % are in free under ~IrProgram (the SRT evaluator, #11719/#11755, is next at 3.4 %). Values are allocated during every shader preparation, and each draw or dispatch with a new shader goes through it.

This change keeps a program's values in chunks, starting at 64 values per chunk and doubling up to 4096:

  • CreateValue constructs each new value in the next free slot.
  • ReclaimUnusedValues destroys the unused values and keeps their slots for the values the program creates next.
  • The destructor destroys the live values and frees the chunks.

On 152 Crimson Desert (PPSA25286 01.000.568) shader requests, agc_shader_replay --prepare uses 18.2 % less CPU time (10 of 10 rounds, both orders). All 65 Crimson Desert and 302 MXGP 26 (PPSA30839 01.003.000) SPIR-V outputs are byte-identical, and max RSS stays the same.

How

IrValuePool (in IrProgram.hpp) replaces std::vector<std::unique_ptr<IrValue>>:

  • Storage: raw chunks from ::operator new with IrValue's alignment, as IrValueArena already does for plans. The pool also keeps the live values in creation order and a list of free slots.
  • Create: takes a freed slot if there is one, otherwise the next slot of the newest chunk. If the IrValue constructor throws, nothing is recorded.
  • EraseIf: destroys the matching values, keeps their slots, and leaves the live list in order, as std::erase_if on the old vector did.
  • Moves: moving a program moves the chunks, so value addresses stay valid. agc_ir_reclaim covers move construction and move assignment.

ReclaimUnusedValues iterates in the same order as before, and IDs still come from nextValueId and are never reused.

Memory: compileVariant keeps creating values after the plan's reclaim, and those new values reuse the freed slots, much as free followed by malloc did before. A program holds at most one partly used chunk of up to 4096 values.

Where the time goes: one DWARF profile per side (perf record --call-graph dwarf -F 199, same input) shows:

  • Total samples fall from 3110 to 2491 (−19.9 %).
  • Allocator functions (_int_malloc, unlink_chunk, free, _int_free_merge_chunk and friends) fall from 778 to 512.
  • IrValue accessors (HasUses, Parent, Id, Resolve, IsPhi and others) fall from 433 to 266. The values now sit next to each other, so passes that walk them miss the cache less often.

Tested

Linux, i7-13700K, GCC 15.2, Release with ANYPS5_ENABLE_SPIRV_TOOLS=OFF. I built cmake --build build-rel --target agc_shader_replay at main 13926067ac and at this change (c31e8e0fe3).

  • Equivalence: I ran ANYPS5_NO_SHADER_CACHE=1 agc_shader_replay --spv over the same 152 Crimson Desert and 305 MXGP 26 requests as #11719 (input hashes in #11719). Each binary ran in an empty directory per set, and I diffed the sha256sum * | sort -k2 lists. All 65 and 302 SPIR-V outputs are byte-identical to main's.
  • CPU time and memory: each run was ANYPS5_NO_SHADER_CACHE=1 /usr/bin/time -f %M perf stat -x, -e task-clock agc_shader_replay --prepare <the 152 requests> in a fresh empty directory, with the order alternating per round:
Round Order main (ms) this PR (ms) change main max RSS (KB) this PR max RSS (KB)
1 main, this 16563 13498 -18.5 % 271364 269032
2 this, main 15940 13130 -17.6 % 271184 271904
3 main, this 15651 12729 -18.7 % 271732 268944
4 this, main 15912 12962 -18.5 % 271444 269168
5 main, this 16967 13918 -18.0 % 271440 268944
6 this, main 15785 12798 -18.9 % 271460 269220
7 main, this 15690 12805 -18.4 % 271768 271908
8 this, main 15763 12893 -18.2 % 270928 269480
9 main, this 15684 12958 -17.4 % 271020 269016
10 this, main 15645 12859 -17.8 % 271392 269464

Over the 10 rounds, the means are 15.96 s for main and 13.06 s for this PR, an 18.2 % drop (medians 15.77 and 12.93 s, SD 0.45 and 0.37 s). This PR is lower in all 10 rounds. Mean max RSS is 271.4 MB for main and 269.7 MB for this PR.

The binaries' sha256 prefixes are 50c1220f47cc (main) and 8c3d6925612d (this PR). These numbers use glibc's allocator, which titles use on Linux. I haven't measured Windows' default heap or APS5_MIMALLOC=1, where the allocator share of the gain may differ.

  • Tests: I ran the 19 AGC test targets whose sources use IrProgram: agc_ir_reclaim, agc_validate_program, agc_masked_select, agc_redundant_value_elimination, agc_constant_bit_test, agc_constant_phi, agc_constant_select, agc_denormal_flush_elimination, agc_flat_scratch, agc_guarded_memory_loads, agc_integer_folding, agc_integer_narrowing, agc_placeholder_images, agc_scalar_select_mask, agc_shader_device_profile, agc_shader_mode_register, agc_spirv_failure_text, agc_tessellation_lowering and agc_vector_window (20 ctest entries). Each passes 3 of 3 (--repeat until-fail:3) on an RTX 4070 Ti (NVIDIA 615.71.09) at this head. On Windows 11 (WinLibs GCC 15.2, Release, GT 1030 with NVIDIA R580), the same tests except agc_flat_scratch (19 entries) pass 3 of 3 at this head and at its base 13926067ac. agc_ir_reclaim covers what this change has to keep: reclaim counts, IDs that are never reused, and values staying valid across program move construction and move assignment. Under AddressSanitizer (ANYPS5_ENABLE_ASAN=ON, RelWithDebInfo), agc_ir_reclaim and agc_validate_program pass 3 of 3 at this head with no ASan report.

This is a CPU-only shader-compilation change with byte-identical SPIR-V, like #11719, #9132 and #9198. It therefore uses the paired CPU replay that oneandonlydean accepted for those (#11719) instead of title captures.

Rebase and a kept-program fix (10-30)

#12039 landed before this PR, so it is now rebased onto main 91db3f79f7. The one conflict was the allocation line of IrProgram::CreateValue. It is resolved the way #12039's description validated: IrValuePool::Create takes the use arena and CreateValue passes useArena.Resource(). useArena is declared before values, so the pool still destroys its values while the arena is alive, as main's vector did.

The rebased A/B found a memory problem, which the second commit (cb2159e48f) fixes:

  • getSource keeps the program it built a plan from, for the source's first variant compile. When Materialize then throws, no compile runs, so the program stays with the SourceEntry for the life of the process. main keeps it too, but compactly.
  • With the pool, a kept program holds the slots of its peak value count. 87 of the 152 Crimson Desert requests fail in replay (SrtWalker::EvaluateDescriptorSources), and their kept programs held about 1 GB (jemalloc peak profile: all of it under getSource -> ResourceProgram).
  • recompileOnce now releases the kept program when materialization throws. A later request for the source prepares it again.

Replay A/B at cb2159e48f against 91db3f79f7: agc_shader_replay --spv over the 152 Crimson Desert and 305 MXGP requests, ANYPS5_NO_SHADER_CACHE=1, 10 interleaved rounds, task-clock and max RSS:

  • SPIR-V is byte-identical for both sets (65 and 302 modules, 0 differ).
  • CPU: 19.73 s on main and 17.11 s here (-13.3 %), lower in every round.
  • Max RSS: 1,360 MiB on main and 663 MiB here (-51 %), lower in every round. Most of that is the released programs, which main also keeps. I didn't measure main with only the second commit.

At fa13b1cc64 (before the fix), the same A/B gave -12.8 % CPU but +44 % max RSS (comment). On the 367 requests that compile, the pool alone was already lower: 598 vs 617 MiB.

Tests at cb2159e48f: the 20 ctest entries listed under Tested pass 3 of 3 on the RTX 4070 Ti (NVIDIA 615.71.09). On Windows 11 (WinLibs GCC 15.2, Release, GT 1030 with NVIDIA R580), the same tests except agc_flat_scratch (19 entries) pass 3 of 3 at cb2159e48f and at main 91db3f79f7. The replay timings in the Tested list and the title captures below were measured against the earlier base 13926067ac.

Title captures: Super Meat Boy 3D, main 9af563f33d + #11580 (608dd76843) against the same + this PR (f4aa08df21), 3 interleaved rounds, recompiler cache off. Shader.PrepareArtifact worker time is 12,257 ms → 9,732 (-20.6 %) ms (table and traces). Round 2's summary lines:

{"commit":"608dd7684303","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"0:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.0.0-38-generic","cpu":"13th Gen Intel(R) Core(TM) i7-13700K","cpu_threads":24,"memory_mib":30993,"title_id":"PPSA31162","title":"Super Meat Boy 3D","content_version":"02.000.001","resolution":"3840x2160","window":{"spec":"seconds 0:60","first_present":0,"ms":60050.392},"presents":418,"frame_ms":{"p50":125.479,"p90":143.004,"p99":1199.044,"max":4569.628},"gpu_busy_ms_per_present":85.197,"worker_busy_pct":{"queue worker 0x0":85.267,"queue worker 0x20":83.270},"top_phases_ms_per_frame":{"Driver.Packet":242.053,"Driver.Packet.memory_wait":119.506,"Driver.Packet.dispatch":59.516,"Driver.Dispatch":59.349,"Shader.PrepareArtifact":45.222,"GpuMutex.wait.hook":40.966,"Recorder.Sync":39.158,"Driver.Packet.pipeline_drain":39.118},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":42.929,"events_lost":271345,"totals_full":false}},"trace":"aps5-trace-608dd7684303-3.json.gz"}
{"commit":"f4aa08df21bf","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"0:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.0.0-38-generic","cpu":"13th Gen Intel(R) Core(TM) i7-13700K","cpu_threads":24,"memory_mib":30993,"title_id":"PPSA31162","title":"Super Meat Boy 3D","content_version":"02.000.001","resolution":"3840x2160","window":{"spec":"seconds 0:60","first_present":0,"ms":60128.758},"presents":424,"frame_ms":{"p50":126.356,"p90":139.054,"p99":1435.618,"max":3922.779},"gpu_busy_ms_per_present":88.292,"worker_busy_pct":{"queue worker 0x0":86.808,"queue worker 0x20":84.254},"top_phases_ms_per_frame":{"Driver.Packet":242.499,"Driver.Packet.memory_wait":118.853,"Driver.Packet.dispatch":57.704,"Driver.Dispatch":57.577,"Driver.Packet.pipeline_drain":40.397,"Recorder.Sync":40.110,"GpuMutex.wait.hook":37.600,"Shader.PrepareArtifact":34.582},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":39.547,"events_lost":317419,"totals_full":false}},"trace":"aps5-trace-f4aa08df21bf-3.json.gz"}

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: NVIDIA RTX 4070 Ti (Linux, 615.71.09) for the AGC tests; the replay itself is CPU-only
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5030480290 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11798). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-27T07:54:34Z. --- ### What `IrProgram::CreateValue` allocates every IR value separately with `std::make_unique`, and `~IrProgram` frees them one at a time. On the Crimson Desert replay set it is the biggest allocator caller on `main`: 3.5 % of the profile's samples are in `malloc` under it, and another 2.2 % are in `free` under `~IrProgram` (the SRT evaluator, #11719/#11755, is next at 3.4 %). Values are allocated during every shader preparation, and each draw or dispatch with a new shader goes through it. This change keeps a program's values in chunks, starting at 64 values per chunk and doubling up to 4096: - `CreateValue` constructs each new value in the next free slot. - `ReclaimUnusedValues` destroys the unused values and keeps their slots for the values the program creates next. - The destructor destroys the live values and frees the chunks. On 152 Crimson Desert (PPSA25286 01.000.568) shader requests, `agc_shader_replay --prepare` uses **18.2 % less CPU time** (10 of 10 rounds, both orders). All 65 Crimson Desert and 302 MXGP 26 (PPSA30839 01.003.000) SPIR-V outputs are byte-identical, and max RSS stays the same. ### How `IrValuePool` (in `IrProgram.hpp`) replaces `std::vector<std::unique_ptr<IrValue>>`: - **Storage:** raw chunks from `::operator new` with `IrValue`'s alignment, as `IrValueArena` already does for plans. The pool also keeps the live values in creation order and a list of free slots. - **`Create`:** takes a freed slot if there is one, otherwise the next slot of the newest chunk. If the `IrValue` constructor throws, nothing is recorded. - **`EraseIf`:** destroys the matching values, keeps their slots, and leaves the live list in order, as `std::erase_if` on the old vector did. - **Moves:** moving a program moves the chunks, so value addresses stay valid. `agc_ir_reclaim` covers move construction and move assignment. `ReclaimUnusedValues` iterates in the same order as before, and IDs still come from `nextValueId` and are never reused. **Memory:** `compileVariant` keeps creating values after the plan's reclaim, and those new values reuse the freed slots, much as `free` followed by `malloc` did before. A program holds at most one partly used chunk of up to 4096 values. **Where the time goes:** one DWARF profile per side (`perf record --call-graph dwarf -F 199`, same input) shows: - Total samples fall from 3110 to 2491 (−19.9 %). - Allocator functions (`_int_malloc`, `unlink_chunk`, `free`, `_int_free_merge_chunk` and friends) fall from 778 to 512. - `IrValue` accessors (`HasUses`, `Parent`, `Id`, `Resolve`, `IsPhi` and others) fall from 433 to 266. The values now sit next to each other, so passes that walk them miss the cache less often. ### Tested Linux, i7-13700K, GCC 15.2, Release with `ANYPS5_ENABLE_SPIRV_TOOLS=OFF`. I built `cmake --build build-rel --target agc_shader_replay` at `main` 13926067ac and at this change (`c31e8e0fe3`). - **Equivalence:** I ran `ANYPS5_NO_SHADER_CACHE=1 agc_shader_replay --spv` over the same 152 Crimson Desert and 305 MXGP 26 requests as #11719 (input hashes in [#11719](https://github.com/boykopovar/AnyPS5/pull/11719#issuecomment-6435622726)). Each binary ran in an empty directory per set, and I diffed the `sha256sum * | sort -k2` lists. All 65 and 302 SPIR-V outputs are byte-identical to `main`'s. - **CPU time and memory:** each run was `ANYPS5_NO_SHADER_CACHE=1 /usr/bin/time -f %M perf stat -x, -e task-clock agc_shader_replay --prepare <the 152 requests>` in a fresh empty directory, with the order alternating per round: | Round | Order | `main` (ms) | this PR (ms) | change | `main` max RSS (KB) | this PR max RSS (KB) | |---|---|---|---|---|---|---| | 1 | main, this | 16563 | 13498 | -18.5 % | 271364 | 269032 | | 2 | this, main | 15940 | 13130 | -17.6 % | 271184 | 271904 | | 3 | main, this | 15651 | 12729 | -18.7 % | 271732 | 268944 | | 4 | this, main | 15912 | 12962 | -18.5 % | 271444 | 269168 | | 5 | main, this | 16967 | 13918 | -18.0 % | 271440 | 268944 | | 6 | this, main | 15785 | 12798 | -18.9 % | 271460 | 269220 | | 7 | main, this | 15690 | 12805 | -18.4 % | 271768 | 271908 | | 8 | this, main | 15763 | 12893 | -18.2 % | 270928 | 269480 | | 9 | main, this | 15684 | 12958 | -17.4 % | 271020 | 269016 | | 10 | this, main | 15645 | 12859 | -17.8 % | 271392 | 269464 | Over the 10 rounds, the means are 15.96 s for `main` and 13.06 s for this PR, an 18.2 % drop (medians 15.77 and 12.93 s, SD 0.45 and 0.37 s). This PR is lower in all 10 rounds. Mean max RSS is 271.4 MB for `main` and 269.7 MB for this PR. The binaries' sha256 prefixes are `50c1220f47cc` (`main`) and `8c3d6925612d` (this PR). These numbers use glibc's allocator, which titles use on Linux. I haven't measured Windows' default heap or `APS5_MIMALLOC=1`, where the allocator share of the gain may differ. - **Tests:** I ran the 19 AGC test targets whose sources use `IrProgram`: `agc_ir_reclaim`, `agc_validate_program`, `agc_masked_select`, `agc_redundant_value_elimination`, `agc_constant_bit_test`, `agc_constant_phi`, `agc_constant_select`, `agc_denormal_flush_elimination`, `agc_flat_scratch`, `agc_guarded_memory_loads`, `agc_integer_folding`, `agc_integer_narrowing`, `agc_placeholder_images`, `agc_scalar_select_mask`, `agc_shader_device_profile`, `agc_shader_mode_register`, `agc_spirv_failure_text`, `agc_tessellation_lowering` and `agc_vector_window` (20 ctest entries). Each passes 3 of 3 (`--repeat until-fail:3`) on an RTX 4070 Ti (NVIDIA 615.71.09) at this head. On Windows 11 (WinLibs GCC 15.2, Release, GT 1030 with NVIDIA R580), the same tests except `agc_flat_scratch` (19 entries) pass 3 of 3 at this head and at its base `13926067ac`. `agc_ir_reclaim` covers what this change has to keep: reclaim counts, IDs that are never reused, and values staying valid across program move construction and move assignment. Under AddressSanitizer (`ANYPS5_ENABLE_ASAN=ON`, RelWithDebInfo), `agc_ir_reclaim` and `agc_validate_program` pass 3 of 3 at this head with no ASan report. This is a CPU-only shader-compilation change with byte-identical SPIR-V, like #11719, #9132 and #9198. It therefore uses the paired CPU replay that oneandonlydean accepted for those ([#11719](https://github.com/boykopovar/AnyPS5/pull/11719#issuecomment-6435583235)) instead of title captures. ### Rebase and a kept-program fix (10-30) #12039 landed before this PR, so it is now rebased onto `main` `91db3f79f7`. The one conflict was the allocation line of `IrProgram::CreateValue`. It is resolved the way #12039's description validated: `IrValuePool::Create` takes the use arena and `CreateValue` passes `useArena.Resource()`. `useArena` is declared before `values`, so the pool still destroys its values while the arena is alive, as `main`'s vector did. The rebased A/B found a memory problem, which the second commit (`cb2159e48f`) fixes: - `getSource` keeps the program it built a plan from, for the source's first variant compile. When `Materialize` then throws, no compile runs, so the program stays with the `SourceEntry` for the life of the process. `main` keeps it too, but compactly. - With the pool, a kept program holds the slots of its peak value count. 87 of the 152 Crimson Desert requests fail in replay (`SrtWalker::EvaluateDescriptorSources`), and their kept programs held about 1 GB (jemalloc peak profile: all of it under `getSource` -> `ResourceProgram`). - `recompileOnce` now releases the kept program when materialization throws. A later request for the source prepares it again. **Replay A/B at `cb2159e48f`** against `91db3f79f7`: `agc_shader_replay --spv` over the 152 Crimson Desert and 305 MXGP requests, `ANYPS5_NO_SHADER_CACHE=1`, 10 interleaved rounds, task-clock and max RSS: - SPIR-V is byte-identical for both sets (65 and 302 modules, 0 differ). - CPU: 19.73 s on `main` and 17.11 s here (-13.3 %), lower in every round. - Max RSS: 1,360 MiB on `main` and 663 MiB here (-51 %), lower in every round. Most of that is the released programs, which `main` also keeps. I didn't measure `main` with only the second commit. At `fa13b1cc64` (before the fix), the same A/B gave -12.8 % CPU but +44 % max RSS ([comment](https://github.com/boykopovar/AnyPS5/pull/11798#issuecomment-6533809087)). On the 367 requests that compile, the pool alone was already lower: 598 vs 617 MiB. **Tests at `cb2159e48f`:** the 20 ctest entries listed under Tested pass 3 of 3 on the RTX 4070 Ti (NVIDIA 615.71.09). On Windows 11 (WinLibs GCC 15.2, Release, GT 1030 with NVIDIA R580), the same tests except `agc_flat_scratch` (19 entries) pass 3 of 3 at `cb2159e48f` and at `main` `91db3f79f7`. The replay timings in the Tested list and the title captures below were measured against the earlier base `13926067ac`. **Title captures:** Super Meat Boy 3D, `main` `9af563f33d` + #11580 (`608dd76843`) against the same + this PR (`f4aa08df21`), 3 interleaved rounds, recompiler cache off. `Shader.PrepareArtifact` worker time is 12,257 ms → 9,732 (-20.6 %) ms ([table and traces](https://github.com/milescoviello/AnyPS5/releases/tag/pr11798-smb3d-captures)). Round 2's summary lines: ``` {"commit":"608dd7684303","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"0:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.0.0-38-generic","cpu":"13th Gen Intel(R) Core(TM) i7-13700K","cpu_threads":24,"memory_mib":30993,"title_id":"PPSA31162","title":"Super Meat Boy 3D","content_version":"02.000.001","resolution":"3840x2160","window":{"spec":"seconds 0:60","first_present":0,"ms":60050.392},"presents":418,"frame_ms":{"p50":125.479,"p90":143.004,"p99":1199.044,"max":4569.628},"gpu_busy_ms_per_present":85.197,"worker_busy_pct":{"queue worker 0x0":85.267,"queue worker 0x20":83.270},"top_phases_ms_per_frame":{"Driver.Packet":242.053,"Driver.Packet.memory_wait":119.506,"Driver.Packet.dispatch":59.516,"Driver.Dispatch":59.349,"Shader.PrepareArtifact":45.222,"GpuMutex.wait.hook":40.966,"Recorder.Sync":39.158,"Driver.Packet.pipeline_drain":39.118},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":42.929,"events_lost":271345,"totals_full":false}},"trace":"aps5-trace-608dd7684303-3.json.gz"} {"commit":"f4aa08df21bf","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"0:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.0.0-38-generic","cpu":"13th Gen Intel(R) Core(TM) i7-13700K","cpu_threads":24,"memory_mib":30993,"title_id":"PPSA31162","title":"Super Meat Boy 3D","content_version":"02.000.001","resolution":"3840x2160","window":{"spec":"seconds 0:60","first_present":0,"ms":60128.758},"presents":424,"frame_ms":{"p50":126.356,"p90":139.054,"p99":1435.618,"max":3922.779},"gpu_busy_ms_per_present":88.292,"worker_busy_pct":{"queue worker 0x0":86.808,"queue worker 0x20":84.254},"top_phases_ms_per_frame":{"Driver.Packet":242.499,"Driver.Packet.memory_wait":118.853,"Driver.Packet.dispatch":57.704,"Driver.Dispatch":57.577,"Driver.Packet.pipeline_drain":40.397,"Recorder.Sync":40.110,"GpuMutex.wait.hook":37.600,"Shader.PrepareArtifact":34.582},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":39.547,"events_lost":317419,"totals_full":false}},"trace":"aps5-trace-f4aa08df21bf-3.json.gz"} ``` ### 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: NVIDIA RTX 4070 Ti (Linux, 615.71.09) for the AGC tests; the replay itself is CPU-only - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-27 08:41:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T08:41:34Z.

Review: APPROVED


Reviewed head c31e8e0fe3ff08f37d63a08a8ee2ab7d9a59dd5b. The pool keeps IRValue addresses stable across chunks and moves, preserves creation-order iteration and IDs, destroys reclaimed values exactly once, reuses only their slots, and rolls back the live-list insertion if allocation/construction fails. The existing reclaim tests cover move construction/assignment and stable IDs. The author reports byte-identical SPIR-V over 367 shader outputs, 10 interleaved CPU-replay rounds all favoring the change, 19 focused AGC test targets repeated on Linux/Windows, and ASan runs; hosted product jobs are skipped and I did not rerun them. I accept paired CPU replay for this CPU-only compilation change under the maintainer precedent recorded on #11719/#9132; no game capture is needed for this specific class of change. The automated perf numbers missing label remains an intake/reporting status for maintainers to handle.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5664233247 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11798#pullrequestreview-5664233247). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-27T08:41:34Z. **Review:** APPROVED --- Reviewed head c31e8e0fe3ff08f37d63a08a8ee2ab7d9a59dd5b. The pool keeps IRValue addresses stable across chunks and moves, preserves creation-order iteration and IDs, destroys reclaimed values exactly once, reuses only their slots, and rolls back the live-list insertion if allocation/construction fails. The existing reclaim tests cover move construction/assignment and stable IDs. The author reports byte-identical SPIR-V over 367 shader outputs, 10 interleaved CPU-replay rounds all favoring the change, 19 focused AGC test targets repeated on Linux/Windows, and ASan runs; hosted product jobs are skipped and I did not rerun them. I accept paired CPU replay for this CPU-only compilation change under the maintainer precedent recorded on #11719/#9132; no game capture is needed for this specific class of change. The automated `perf numbers missing` label remains an intake/reporting status for maintainers to handle.
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!11798
No description provided.