perf(agc): relocate cached draws across moved user-data V#s and fetch subroutines #13610

Merged
ntamas94 merged 3 commits from upstream-pr/13610 into main 2026-10-31 09:22:37 +00:00
ntamas94 commented 2026-10-30 19:32:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ntamas94 on 2026-10-30T19:32:30Z.


What

#4943 finds a cached draw through a relocation alias when user-data words moved and the data behind them is equal. It only moves user words that the stage's SRT walk used as a base and never as a value (asBase & ~asValue), and it refuses every other move. Two kinds of user words that move between otherwise equal draws fall outside that rule:

  • A buffer V# held directly in user SGPRs. Its words are values, so a moved V# was refused, even though the compiled stage only holds the V# in a GuestBuffers element, and that element is bound from the descriptor at draw time (the resource key already treats read-only GuestBuffers bases and record counts as movable).
    • The V# qualifies when its base word appears in exactly one read-only GuestBuffers element of the compiled stage, under all of these conditions:
      • the next two user words equal the element's next two words;
      • the base is in no push word other than the one forwarded from it;
      • it is in no specialization constant and no captured word;
      • no captured run lies inside the V#'s range.
    • Its base and record words then leave the alias key, and the relocated stage patches those two words of the element (descriptorPatches, applied with the forwarded-word patches).
  • The s_swappc target of a GCN vertex program, i.e. its fetch subroutine. The callee is linked into the code, so a moved pointer was refused.
    • Such a word is relocatable when it feeds no binding, push word or captured word.
    • Its alias key hashes the callee's code (UserDataCalleeLength words at the address). A copy of the same subroutine at another address relocates; changed code does not.

Crysis Remastered (CUSA18659) shows both kinds. It keeps its per-object constant buffers as V#s in VS user SGPRs 4..15 and PS 12..15. Its renderer writes each draw's fetch subroutine and vertex buffer table into a ring, and passes them in VS s[0:1] and s[2:3].

  • With #4943 alone, 17,378 of 19,635 donors found through an alias per 100,000 alias lookups were refused.
  • The refused moves were exactly these words.
  • With this PR there are 27 refusals in 100,000.

#5609 (open) handles a third case that Crysis shows as well: a buffer whose V# is read from captured memory (here the vertex buffer table behind s[2:3]). Its base moves while the table's other words stay equal. That case is not in this PR; data for it is on #5609. The two do not overlap:

  • #5609 records buffers whose descriptor lead is a memory read (noteBufferBaseWords);
  • this PR handles V#s that come from user data, and the callee words.

#9899 (open) memoizes the cost of linking user-data callees. It does not change the draw-cache key, so it is complementary.

APS5_NO_DRAW_RELOCATION=1 turns all draw relocation off, as before.

Tested

Windows 11 Pro (10.0.26200), WinLibs GCC 15.2.0, Release with BUILD_TESTING=ON, NVIDIA GeForce RTX 2080 (driver 617.14), on this branch. After merging main de83e8f270 (merge 9ea244c4c1), the new test and the relocation/reuse tests pass again under the validation layer: 14 of 14, no VUID- error, no missing-layer message. The other runs below were made before that merge, on main 16345cad6a + this branch's commits; the merged main commits do not touch libSceAgcDriver/Execution/src/Driver/Draw or its headers.

  • New test agc_driver_draw_relocate_user_values:
    • A pixel shader builds two V#s from user SGPRs that share one record-count SGPR. After the relocation is learned, the shared count grows from one dword to two, and the draw must read the second descriptor's newly covered dword. Without the record-count fix the reused draw keeps the old count and draws 0 there. A control with one count SGPR per descriptor still relocates and draws the grown range.
    • Two read-only bindings sharing a record count: only the base word is tagged.
    • The s_swappc target in s[0:1] is tagged with the callee's length. Two copies of the same callee key the same, a different callee keys differently, and it is not tagged when the word also feeds a binding or outside GCN guest shaders.
    • A read-only V# in user data has its base and record words tagged and patched in its binding.
    • The V# is not tagged when it is written, when its base is in a push word that is not its own forwarded slot, when the stage captured memory inside it, or when the word is already a relocatable pointer.
  • The new test and the draw-cache relocation and reuse tests (agc_driver_draw_cache_relocation*, agc_driver_draw_cache_reuse*, agc_driver_mesh_draw_relocation) on 16345cad6a + this commit: 14 of 14 pass.
  • ctest -j 8 on main 4bc9e779aa + this commit, before rebasing onto 16345cad6a (whose 40 commits touch libSceAgcDriver/Execution only in VulkanDevice.cpp): 3,141 of 3,144 pass, 13 of them skipped. vulkan_validation_gate_reports, job_reference_errors and check_compile_test_windows_gcc_response_text_mode_is_not_reinterpreted fail in Python tool tests on this machine's Microsoft Store Python (OSError on its WindowsApps alias path); they test tools/, which this PR does not touch.
  • tools/check_conventions.py --base origin/main --head HEAD: all checks pass.
  • Validation layer, same focused tests on main 16345cad6a and on this branch, ctest -V with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1 (agc_driver_draw_cache_relocation*, agc_driver_draw_cache_reuse*, agc_driver_mesh_draw_relocation, and on this branch also agc_driver_draw_relocate_user_values):
    • main: 13 of 13 pass;
    • this branch: 14 of 14 pass;
    • neither log has was not found but was requested by env var VK_INSTANCE_LAYERS;
    • neither log has a VUID- error. The layer was active: both logs carry the same 16 Validation Warning lines (Undefined-Value-ShaderOutputNotConsumed).
  • Crysis Remastered (CUSA18659), level "Contact". The title does not reach the level on plain main, so both captures run on the same local branch that reaches it:
    • baseline: c06272e103 (main from 2026-10-24 plus local GCN fixes);
    • candidate: the same commit with this PR's two commits cherry-picked (b40b24d172).
    • Only libSceAgcDriver.prx differs between the two runs.
    • Setup: the same scripted input (no camera movement), APS5_TRACE_SECONDS=310:30, APS5_PROFILE_DRAW=1, same machine.
    • Summary lines (traces: baseline, candidate):
{"commit":"c06272e10323","dirty":false,"env":{"APS5_ALLOW_READ_TARGET_ALIAS":"1","APS5_NETCTL_STANDINS":"1","APS5_NO_ALIAS_DROP":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_PROFILE_DRAW":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"310:30"},"gpu":"NVIDIA GeForce RTX 2080","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32713,"resolution":"1920x1080","window":{"spec":"seconds 310:30","first_present":7925,"ms":30123.528},"presents":266,"frame_ms":{"p50":110.016,"p90":128.527,"p99":172.620,"max":280.440},"gpu_busy_ms_per_present":39.639,"worker_busy_pct":{"queue worker 0x0":95.449},"top_phases_ms_per_frame":{"Driver.Packet":107.772,"Driver.Packet.draw":83.211,"Driver.Draw":81.673,"Graphics.Draw":67.269,"Driver.Draw.shader_compile_and_link":62.186,"Graphics.Draw.draw_and_resource_release":62.024,"Shader.DrawStage":58.098,"Shader.DrawStage.prepared_invocation":29.835},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":4.605,"events_lost":1631752,"totals_full":false},"draw committer":{"events_full_after_s":11.710,"events_lost":415228,"totals_full":false}},"trace":"aps5-trace-c06272e10323-34604.json.gz"}
{"commit":"b40b24d17252","dirty":false,"env":{"APS5_ALLOW_READ_TARGET_ALIAS":"1","APS5_NETCTL_STANDINS":"1","APS5_NO_ALIAS_DROP":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_PROFILE_DRAW":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"310:30"},"gpu":"NVIDIA GeForce RTX 2080","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32713,"resolution":"1920x1080","window":{"spec":"seconds 310:30","first_present":8013,"ms":30026.268},"presents":245,"frame_ms":{"p50":110.903,"p90":122.510,"p99":171.503,"max":2844.708},"gpu_busy_ms_per_present":41.250,"worker_busy_pct":{"queue worker 0x0":95.963},"top_phases_ms_per_frame":{"Driver.Packet":117.322,"Driver.Packet.draw":83.930,"Driver.Draw":82.421,"Graphics.Draw":67.105,"Graphics.Draw.draw_and_resource_release":62.184,"Driver.Draw.shader_compile_and_link":61.898,"Shader.DrawStage":54.410,"Shader.DrawStage.prepared_invocation":29.192},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":4.274,"events_lost":1403161,"totals_full":false},"draw committer":{"events_full_after_s":11.380,"events_lost":359744,"totals_full":false}},"trace":"aps5-trace-b40b24d17252-58076.json.gz"}
  • tools/performance_compare.py (the captures are windows, so trace_digest.py has no interval rows to print):

    baseline candidate change
    frame p50 110.0 ms 110.9 ms +0.8%
    frame p90 128.5 ms 122.5 ms -4.7%
    frame p99 172.6 ms 171.5 ms -0.6%
    mean frame 113.2 ms 122.6 ms +8.2% (one 2.8 s present in the candidate window)
    Shader.DrawStage 58.1 ms/frame 54.4 ms/frame -6.3%
    draw-cache hits (last 10 s report) 3,250 of 125,087 (2.6%) 13,972 of 110,646 (12.6%)
  • So this change alone does not shorten Crysis's frames measurably: its relocated vertex stages still miss on the vertex buffer V# base inside the table. That table is #5609's case.

  • The earlier numbers, which included a local stand-in for #5609's case (50.3% hits, 59.8 µs per draw packet against 71.7), came from a different local configuration and are not this PR's gain.

  • Cache verification on the candidate, APS5_VERIFY_DRAW_DATA_HITS=1 APS5_VERIFY_DRAW_ENTRIES=1, the same scripted run, 400 s:

    • 125,459 hits captured again, 0 stages differed;
    • 78,222 hits through a relocated entry, in four 100,000-lookup reports with 13-14 refusals each;
    • no verification abort.

Checklist

  • Based on current main; no other open PR implements the same functions (searched open and closed boykopovar/AnyPS5 PRs for draw relocation, user data V#, fetch shader relocation, swappc callee, user-data callee, buffer base moved and draw cache key on 2026-10-30; #5609 and #9899 are related, see above)
  • 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 (#4943 is merged)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 2080, driver 617.14, Windows 11 (10.0.26200)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5090000032 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13610). Originally posted by [ntamas94](https://github.com/ntamas94) on 2026-10-30T19:32:30Z. --- ### What #4943 finds a cached draw through a relocation alias when user-data words moved and the data behind them is equal. It only moves user words that the stage's SRT walk used as a base and never as a value (`asBase & ~asValue`), and it refuses every other move. Two kinds of user words that move between otherwise equal draws fall outside that rule: - **A buffer V# held directly in user SGPRs.** Its words are values, so a moved V# was refused, even though the compiled stage only holds the V# in a GuestBuffers element, and that element is bound from the descriptor at draw time (the resource key already treats read-only GuestBuffers bases and record counts as movable). - The V# qualifies when its base word appears in exactly one read-only GuestBuffers element of the compiled stage, under all of these conditions: - the next two user words equal the element's next two words; - the base is in no push word other than the one forwarded from it; - it is in no specialization constant and no captured word; - no captured run lies inside the V#'s range. - Its base and record words then leave the alias key, and the relocated stage patches those two words of the element (`descriptorPatches`, applied with the forwarded-word patches). - **The `s_swappc` target of a GCN vertex program, i.e. its fetch subroutine.** The callee is linked into the code, so a moved pointer was refused. - Such a word is relocatable when it feeds no binding, push word or captured word. - Its alias key hashes the callee's code (`UserDataCalleeLength` words at the address). A copy of the same subroutine at another address relocates; changed code does not. Crysis Remastered (CUSA18659) shows both kinds. It keeps its per-object constant buffers as V#s in VS user SGPRs 4..15 and PS 12..15. Its renderer writes each draw's fetch subroutine and vertex buffer table into a ring, and passes them in VS s[0:1] and s[2:3]. - With #4943 alone, 17,378 of 19,635 donors found through an alias per 100,000 alias lookups were refused. - The refused moves were exactly these words. - With this PR there are 27 refusals in 100,000. #5609 (open) handles a third case that Crysis shows as well: a buffer whose V# is read from captured memory (here the vertex buffer table behind s[2:3]). Its base moves while the table's other words stay equal. That case is not in this PR; data for it is on #5609. The two do not overlap: - #5609 records buffers whose descriptor lead is a memory read (`noteBufferBaseWords`); - this PR handles V#s that come from user data, and the callee words. #9899 (open) memoizes the cost of linking user-data callees. It does not change the draw-cache key, so it is complementary. `APS5_NO_DRAW_RELOCATION=1` turns all draw relocation off, as before. ### Tested Windows 11 Pro (10.0.26200), WinLibs GCC 15.2.0, Release with `BUILD_TESTING=ON`, NVIDIA GeForce RTX 2080 (driver 617.14), on this branch. After merging `main` `de83e8f270` (merge `9ea244c4c1`), the new test and the relocation/reuse tests pass again under the validation layer: 14 of 14, no `VUID-` error, no missing-layer message. The other runs below were made before that merge, on `main` `16345cad6a` + this branch's commits; the merged `main` commits do not touch `libSceAgcDriver/Execution/src/Driver/Draw` or its headers. - New test `agc_driver_draw_relocate_user_values`: - A pixel shader builds two V#s from user SGPRs that share one record-count SGPR. After the relocation is learned, the shared count grows from one dword to two, and the draw must read the second descriptor's newly covered dword. Without the record-count fix the reused draw keeps the old count and draws 0 there. A control with one count SGPR per descriptor still relocates and draws the grown range. - Two read-only bindings sharing a record count: only the base word is tagged. - The s_swappc target in s[0:1] is tagged with the callee's length. Two copies of the same callee key the same, a different callee keys differently, and it is not tagged when the word also feeds a binding or outside GCN guest shaders. - A read-only V# in user data has its base and record words tagged and patched in its binding. - The V# is not tagged when it is written, when its base is in a push word that is not its own forwarded slot, when the stage captured memory inside it, or when the word is already a relocatable pointer. - The new test and the draw-cache relocation and reuse tests (`agc_driver_draw_cache_relocation*`, `agc_driver_draw_cache_reuse*`, `agc_driver_mesh_draw_relocation`) on `16345cad6a` + this commit: 14 of 14 pass. - `ctest -j 8` on `main` `4bc9e779aa` + this commit, before rebasing onto `16345cad6a` (whose 40 commits touch `libSceAgcDriver/Execution` only in `VulkanDevice.cpp`): 3,141 of 3,144 pass, 13 of them skipped. `vulkan_validation_gate_reports`, `job_reference_errors` and `check_compile_test_windows_gcc_response_text_mode_is_not_reinterpreted` fail in Python tool tests on this machine's Microsoft Store Python (`OSError` on its WindowsApps alias path); they test `tools/`, which this PR does not touch. - `tools/check_conventions.py --base origin/main --head HEAD`: all checks pass. - Validation layer, same focused tests on `main` `16345cad6a` and on this branch, `ctest -V` with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1` (`agc_driver_draw_cache_relocation*`, `agc_driver_draw_cache_reuse*`, `agc_driver_mesh_draw_relocation`, and on this branch also `agc_driver_draw_relocate_user_values`): - `main`: 13 of 13 pass; - this branch: 14 of 14 pass; - neither log has `was not found but was requested by env var VK_INSTANCE_LAYERS`; - neither log has a `VUID-` error. The layer was active: both logs carry the same 16 `Validation Warning` lines (`Undefined-Value-ShaderOutputNotConsumed`). - Crysis Remastered (CUSA18659), level "Contact". The title does not reach the level on plain `main`, so both captures run on the same local branch that reaches it: - baseline: `c06272e103` (`main` from 2026-10-24 plus local GCN fixes); - candidate: the same commit with this PR's two commits cherry-picked (`b40b24d172`). - Only `libSceAgcDriver.prx` differs between the two runs. - Setup: the same scripted input (no camera movement), `APS5_TRACE_SECONDS=310:30`, `APS5_PROFILE_DRAW=1`, same machine. - Summary lines (traces: [baseline](https://github.com/ntamas94/AnyPS5/releases/download/pr-13610-traces/crysis-contact-baseline-c06272e10323.json.gz), [candidate](https://github.com/ntamas94/AnyPS5/releases/download/pr-13610-traces/crysis-contact-candidate-b40b24d17252.json.gz)): ``` {"commit":"c06272e10323","dirty":false,"env":{"APS5_ALLOW_READ_TARGET_ALIAS":"1","APS5_NETCTL_STANDINS":"1","APS5_NO_ALIAS_DROP":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_PROFILE_DRAW":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"310:30"},"gpu":"NVIDIA GeForce RTX 2080","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32713,"resolution":"1920x1080","window":{"spec":"seconds 310:30","first_present":7925,"ms":30123.528},"presents":266,"frame_ms":{"p50":110.016,"p90":128.527,"p99":172.620,"max":280.440},"gpu_busy_ms_per_present":39.639,"worker_busy_pct":{"queue worker 0x0":95.449},"top_phases_ms_per_frame":{"Driver.Packet":107.772,"Driver.Packet.draw":83.211,"Driver.Draw":81.673,"Graphics.Draw":67.269,"Driver.Draw.shader_compile_and_link":62.186,"Graphics.Draw.draw_and_resource_release":62.024,"Shader.DrawStage":58.098,"Shader.DrawStage.prepared_invocation":29.835},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":4.605,"events_lost":1631752,"totals_full":false},"draw committer":{"events_full_after_s":11.710,"events_lost":415228,"totals_full":false}},"trace":"aps5-trace-c06272e10323-34604.json.gz"} {"commit":"b40b24d17252","dirty":false,"env":{"APS5_ALLOW_READ_TARGET_ALIAS":"1","APS5_NETCTL_STANDINS":"1","APS5_NO_ALIAS_DROP":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_PROFILE_DRAW":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"310:30"},"gpu":"NVIDIA GeForce RTX 2080","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32713,"resolution":"1920x1080","window":{"spec":"seconds 310:30","first_present":8013,"ms":30026.268},"presents":245,"frame_ms":{"p50":110.903,"p90":122.510,"p99":171.503,"max":2844.708},"gpu_busy_ms_per_present":41.250,"worker_busy_pct":{"queue worker 0x0":95.963},"top_phases_ms_per_frame":{"Driver.Packet":117.322,"Driver.Packet.draw":83.930,"Driver.Draw":82.421,"Graphics.Draw":67.105,"Graphics.Draw.draw_and_resource_release":62.184,"Driver.Draw.shader_compile_and_link":61.898,"Shader.DrawStage":54.410,"Shader.DrawStage.prepared_invocation":29.192},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":4.274,"events_lost":1403161,"totals_full":false},"draw committer":{"events_full_after_s":11.380,"events_lost":359744,"totals_full":false}},"trace":"aps5-trace-b40b24d17252-58076.json.gz"} ``` - `tools/performance_compare.py` (the captures are windows, so `trace_digest.py` has no interval rows to print): | | baseline | candidate | change | |---|---:|---:|---:| | frame p50 | 110.0 ms | 110.9 ms | +0.8% | | frame p90 | 128.5 ms | 122.5 ms | -4.7% | | frame p99 | 172.6 ms | 171.5 ms | -0.6% | | mean frame | 113.2 ms | 122.6 ms | +8.2% (one 2.8 s present in the candidate window) | | `Shader.DrawStage` | 58.1 ms/frame | 54.4 ms/frame | -6.3% | | draw-cache hits (last 10 s report) | 3,250 of 125,087 (2.6%) | 13,972 of 110,646 (12.6%) | | - So this change alone does not shorten Crysis's frames measurably: its relocated vertex stages still miss on the vertex buffer V# base inside the table. That table is #5609's case. - The earlier numbers, which included a local stand-in for #5609's case (50.3% hits, 59.8 µs per draw packet against 71.7), came from a different local configuration and are not this PR's gain. - Cache verification on the candidate, `APS5_VERIFY_DRAW_DATA_HITS=1 APS5_VERIFY_DRAW_ENTRIES=1`, the same scripted run, 400 s: - 125,459 hits captured again, 0 stages differed; - 78,222 hits through a relocated entry, in four 100,000-lookup reports with 13-14 refusals each; - no verification abort. ### 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 (searched open and closed boykopovar/AnyPS5 PRs for draw relocation, user data V#, fetch shader relocation, swappc callee, user-data callee, buffer base moved and draw cache key on 2026-10-30; #5609 and #9899 are related, see above) - [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 (#4943 is merged) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 2080, driver 617.14, Windows 11 (10.0.26200) - [x] AI-assisted: yes
MarcZX10 commented 2026-10-30 19:40:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T19:40:59Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The perf(agc) report omits repository-required matched captures and Vulkan validation evidence, so the performance and GPU results cannot be independently checked.

What I ran

Reviewed head 306b439fd684485dbca87c068037a02678c1f5aa against PR base 16345cad6a692bc37e682150f11c7ab635788941. The stack helper previewed the PR cleanly against then-current main cf0e33b6a070c2c69e2956a524da75082cb2cff1. Environment: Linux x86-64, Python 3.11.2, GCC 12.2.0. I did not build or compile.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13610
git diff --check 16345cad6a692bc37e682150f11c7ab635788941...306b439fd684485dbca87c068037a02678c1f5aa
python3 tools/check_conventions.py --base 16345cad6a692bc37e682150f11c7ab635788941 --head 306b439fd684485dbca87c068037a02678c1f5aa --title 'perf(agc): relocate cached draws across moved user-data V#s and fetch subroutines' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13610-306b439fd684/pr-body.md
python3 tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13610-306b439fd684/head-306b439fd684-06ce39be --json core/libs/prx/libSceAgcDriver/tests/execution/DrawRelocateUserValues.cpp
grep -n -E 'agcExecutionTestSources|add_test_executable' core/libs/prx/libSceAgcDriver/CMakeLists.txt
gh pr diff 13610 --repo boykopovar/AnyPS5 --patch

Results

Check Result
git diff --check Passed; no output.
Repository conventions and PR template Passed.
No-build precheck Incomplete: diff, conventions, and stack preview passed; its ABI and test-quality steps could not start because those helper scripts are absent from the isolated PR checkout. The helper's final head/base stability check passed.
New C++ test registration heuristic Warned that the test path was not found literally. Direct CMake inspection shows tests/execution/*.cpp is collected by GLOB CONFIGURE_DEPENDS and passed to add_test_executable; this is a false positive.
Hosted CI snapshot Eligibility, intake, and report passed; conventions and labels were queued, library portability was in progress, and Windows was queued. Linux and specialized build jobs were skipped.
Author-reported runtime/tests The PR description reports Windows tests and a Crysis Remastered run; I did not independently run them. The description has no paired CTest validation-layer logs or attached trace files.
Unedited output from local checks
All conventions checks passed.

git diff --check exited 0 and emitted no output. The precheck's unavailable-helper errors were:

/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13610-306b439fd684/head-306b439fd684-06ce39be/tools/pr_abi_audit.py': [Errno 2] No such file or directory
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13610-306b439fd684/head-306b439fd684-06ce39be/tools/pr_test_quality.py': [Errno 2] No such file or directory

The test-quality helper's output was:

{
  "findings": [
    {
      "path": "core/libs/prx/libSceAgcDriver/tests/execution/DrawRelocateUserValues.cpp",
      "line": 1,
      "kind": "possible-unregistered-cpp-test",
      "message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage."
    }
  ],
  "negative_control_candidates": [],
  "limits": [
    "Heuristics can miss weak assertions and can flag valid tests; inspect every finding.",
    "A test that passes against base is not by itself proof that the PR test is inadequate.",
    "Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error."
  ]
}

Findings

Blocking

  • Required performance and AGC validation evidence is missing. The description gives aggregate hit-rate and timing numbers, but not the two valid aps5-summary.jsonl lines for main and this change with distinct commit IDs, attached traces, or tools/trace_digest.py output. It also reports tests on the change without the repository-required same focused ctest -V run on main and this head using VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, and ANYPS5_REQUIRE_VULKAN=1, with logs checked for the requested-layer warning and compared for new VUID- errors. Please add the matched performance captures and the paired AGC validation evidence, or state which prescribed runs remain unavailable so maintainers can assess the gap.

Non-blocking

None identified from the source-level review. The test-registration heuristic warning is accounted for by the CMake glob shown in the source.

Sources

Not verified

No local build, CTest, Vulkan validation run, or GPU/game run was performed. Several hosted checks were not complete at the final snapshot; Linux and specialized jobs were skipped.

To get this to a good state

Attach matched main/change summary lines, traces, and digest output, and provide the paired AGC validation logs on the same machine and GPU. I’ll re-run the same applicable checks against the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5717800051 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13610#pullrequestreview-5717800051). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T19:40:59Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The `perf(agc)` report omits repository-required matched captures and Vulkan validation evidence, so the performance and GPU results cannot be independently checked. ## What I ran Reviewed head `306b439fd684485dbca87c068037a02678c1f5aa` against PR base `16345cad6a692bc37e682150f11c7ab635788941`. The stack helper previewed the PR cleanly against then-current `main` `cf0e33b6a070c2c69e2956a524da75082cb2cff1`. Environment: Linux x86-64, Python 3.11.2, GCC 12.2.0. I did not build or compile. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13610 git diff --check 16345cad6a692bc37e682150f11c7ab635788941...306b439fd684485dbca87c068037a02678c1f5aa python3 tools/check_conventions.py --base 16345cad6a692bc37e682150f11c7ab635788941 --head 306b439fd684485dbca87c068037a02678c1f5aa --title 'perf(agc): relocate cached draws across moved user-data V#s and fetch subroutines' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13610-306b439fd684/pr-body.md python3 tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13610-306b439fd684/head-306b439fd684-06ce39be --json core/libs/prx/libSceAgcDriver/tests/execution/DrawRelocateUserValues.cpp grep -n -E 'agcExecutionTestSources|add_test_executable' core/libs/prx/libSceAgcDriver/CMakeLists.txt gh pr diff 13610 --repo boykopovar/AnyPS5 --patch ``` ## Results | Check | Result | |---|---| | `git diff --check` | Passed; no output. | | Repository conventions and PR template | Passed. | | No-build precheck | Incomplete: diff, conventions, and stack preview passed; its ABI and test-quality steps could not start because those helper scripts are absent from the isolated PR checkout. The helper's final head/base stability check passed. | | New C++ test registration heuristic | Warned that the test path was not found literally. Direct CMake inspection shows `tests/execution/*.cpp` is collected by `GLOB CONFIGURE_DEPENDS` and passed to `add_test_executable`; this is a false positive. | | Hosted CI snapshot | Eligibility, intake, and report passed; conventions and labels were queued, library portability was in progress, and Windows was queued. Linux and specialized build jobs were skipped. | | Author-reported runtime/tests | The PR description reports Windows tests and a Crysis Remastered run; I did not independently run them. The description has no paired CTest validation-layer logs or attached trace files. | <details> <summary>Unedited output from local checks</summary> ```text All conventions checks passed. ``` `git diff --check` exited 0 and emitted no output. The precheck's unavailable-helper errors were: ```text /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13610-306b439fd684/head-306b439fd684-06ce39be/tools/pr_abi_audit.py': [Errno 2] No such file or directory /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13610-306b439fd684/head-306b439fd684-06ce39be/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` The test-quality helper's output was: ```json { "findings": [ { "path": "core/libs/prx/libSceAgcDriver/tests/execution/DrawRelocateUserValues.cpp", "line": 1, "kind": "possible-unregistered-cpp-test", "message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage." } ], "negative_control_candidates": [], "limits": [ "Heuristics can miss weak assertions and can flag valid tests; inspect every finding.", "A test that passes against base is not by itself proof that the PR test is inadequate.", "Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error." ] } ``` </details> ## Findings ### Blocking - **Required performance and AGC validation evidence is missing.** The description gives aggregate hit-rate and timing numbers, but not the two valid `aps5-summary.jsonl` lines for `main` and this change with distinct commit IDs, attached traces, or `tools/trace_digest.py` output. It also reports tests on the change without the repository-required same focused `ctest -V` run on `main` and this head using `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, and `ANYPS5_REQUIRE_VULKAN=1`, with logs checked for the requested-layer warning and compared for new `VUID-` errors. Please add the matched performance captures and the paired AGC validation evidence, or state which prescribed runs remain unavailable so maintainers can assess the gap. ### Non-blocking None identified from the source-level review. The test-registration heuristic warning is accounted for by the CMake glob shown in the source. ## Sources - [Performance and AGC validation requirements at the reviewed base](https://github.com/boykopovar/AnyPS5/blob/16345cad6a692bc37e682150f11c7ab635788941/CONTRIBUTING.md#L69) - [CMake registration for execution tests at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/306b439fd684485dbca87c068037a02678c1f5aa/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L2142-L2167) ## Not verified No local build, CTest, Vulkan validation run, or GPU/game run was performed. Several hosted checks were not complete at the final snapshot; Linux and specialized jobs were skipped. ## To get this to a good state Attach matched `main`/change summary lines, traces, and digest output, and provide the paired AGC validation logs on the same machine and GPU. I’ll re-run the same applicable checks against the updated head.
jotitadev commented 2026-10-31 15:08:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-31T15:08:41Z.

Review: COMMENTED


Linux run of head 9ea244c4c1, including a red for 183b781e5f, the fix for oneandonlydean's shared record-count case.

Setup: Ubuntu 26.04, GCC 15.2, Release. RTX 3070 with NVIDIA 595.99.02 and lavapipe (Mesa 26.0.3), one at a time via VK_DRIVER_FILES. The head is merged --no-ff onto main 809c7fa2df with no conflicts. ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, ctest -j1.

  • Green: agc_driver_draw_relocate_user_values passes 3/3 on each device with VVL 1.4.341, with no VUID- lines. On the 3070 it also passes with VVL 1.3.275 and with no layer. all builds with no new warnings.
  • Red for 183b781e5f: this head with only the DrawRelocate.cpp line of that commit reverted, and the test kept. It fails 3/3 on each device with a record count that also builds a second descriptor was tagged (mask 80). So the new tagging check catches the case. The test as a whole doesn't build on main, because tagUserValueWords is new.
  • ^agc (minus dcc/flip/lds_atomics64): 1133/1133 on the 3070 and on lavapipe.

GPUs tested: NVIDIA GeForce RTX 3070, 595.99.02, Ubuntu 26.04; Mesa 26.0.3 lavapipe, Ubuntu 26.04

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5723466685 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13610#pullrequestreview-5723466685). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-31T15:08:41Z. **Review:** COMMENTED --- Linux run of head `9ea244c4c1`, including a red for 183b781e5f, the fix for oneandonlydean's shared record-count case. Setup: Ubuntu 26.04, GCC 15.2, Release. RTX 3070 with NVIDIA 595.99.02 and lavapipe (Mesa 26.0.3), one at a time via `VK_DRIVER_FILES`. The head is merged `--no-ff` onto `main` `809c7fa2df` with no conflicts. `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`, `ctest -j1`. - **Green:** `agc_driver_draw_relocate_user_values` passes 3/3 on each device with VVL 1.4.341, with no `VUID-` lines. On the 3070 it also passes with VVL 1.3.275 and with no layer. `all` builds with no new warnings. - **Red for 183b781e5f:** this head with only the `DrawRelocate.cpp` line of that commit reverted, and the test kept. It fails 3/3 on each device with `a record count that also builds a second descriptor was tagged (mask 80)`. So the new tagging check catches the case. The test as a whole doesn't build on `main`, because `tagUserValueWords` is new. - **`^agc`** (minus dcc/flip/lds_atomics64): 1133/1133 on the 3070 and on lavapipe. GPUs tested: NVIDIA GeForce RTX 3070, 595.99.02, Ubuntu 26.04; Mesa 26.0.3 lavapipe, Ubuntu 26.04 Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
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!13610
No description provided.