perf(agc): clear a fast-cleared sampled texture on the GPU #13648

Merged
JJenkx merged 1 commit from upstream-pr/13648 into main 2026-10-31 11:12:03 +00:00
JJenkx commented 2026-10-30 21:25:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-30T21:25:50Z.


What

A sampled texture made from a surface whose DCC keys hold a fast-clear code goes through cachedTexture's snapshot path, which costs:

  • ReadTextureSurface → FillDccClear writes the clear texel over the whole surface on the CPU;
  • the Texture constructor copies those bytes into a staging buffer;
  • the GPU copies them to a tiled buffer, detiles them, and copies them into the image.

A target that is cleared every frame and sampled while cleared pays all of this each time it is looked up anew. Afterimage (PPSA14053, UE4) does this throughout its intro: APS5_PROFILE_DRAW counts about 330–800 key-driven clear uploads per 10 s there, and the draw committer is the critical path.

This change clears the image with vkCmdClearColorImage instead, recorded in the same recorder batch the upload used. It applies when:

  • the texture's SampledTextureFormat is the format the clear texel is encoded in (DccClearTextureFormat);
  • the texel has an exact clear value (ClearColorForTexel, the conversion multisampled targets already use for their fast clears);
  • the texture is not a comparison, sRGB-expand, repacked or block-compressed texture, and the keys are not a register clear.

Every other case keeps the upload. A clear-code cache entry keeps no snapshot: a clear-code hit never compares bytes (ShaderResources.cpp, the *keys != Uncompressed && *keys != ClearSingle hit), so the bytes were only an upload source. The [textures] line of APS5_PROFILE_DRAW counts these textures as "cleared on the GPU", and SampledTexturesCleared() reports them for the new test.

Test. tests/execution/SampledClearKeys.cpp (agc_driver_sampled_clear_keys) samples a 128x128 RGBA8 64 KiB-tiled surface filled with 0x5a:

  • with uncompressed keys it must read 90/255, made from the texels, with the counter unchanged;
  • with 1111 keys it must read 1.0 in every component, made by a GPU clear (counter +1);
  • with 0000 keys it must read 0.0, made by a GPU clear (counter +1).

On the GPU, forcing the computed clear's red channel to 0.5 makes it fail with 1111 fast clear: component 0 of thread 0 is 0.501961 (0x3f008081), expected 1.

Tested

Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, Radeon RX 6700 XT with AMD proprietary driver 26.10.1, WinLibs GCC 15.2.0 UCRT r7, Release, BUILD_TESTING=ON. Every result below is for this PR's head a8202ea542 (a8202ea542c7e0d749b5b7d419b5ec5188d54712), against its parent main d3118d1946 (d3118d19463159be42daf0ae5ff7f16975dcc902).

GPU tests under validation. ctest --repeat until-fail:3 with VK_LAYER_KHRONOS_validation 1.4.309, each SHA built and run on its own:

head a8202ea542 main d3118d1946
CTest entries 29 selected: 26 passed, 3 skipped 28 selected: 25 passed, 3 skipped (no agc_driver_sampled_clear_keys)
validation-layer insertions 87 84
skipped on this device agc_driver_msaa_dcc_compared_import_2/4/8 the same
VUIDs VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 the same

The entries are the new test plus the 13 execution tests that use DCC keys: AlphaToCoverage, ClampedGlobalFill, DccKeyPresync, DccKeysFirstWrite, DrawWriteRanges, FillCoverKeys, LayeredVolumeSubmit, MemoryValueFill, PresentKeyWriterWait, SampleMultisampleTarget, SgprPatternFillKeys, Srgb8ColorTarget and StagedClearSampledRead. The one VUID comes from agc_driver_srgb8_color_target on both SHAs; it is #11990. Each run records its source SHA and the test executables' SHA-256 in source.txt.

Forcing the computed clear's red channel to 0.5 makes the new test fail: 1111 fast clear: component 0 of thread 0 is 0.501961 (0x3f008081), expected 1. The 42 CTest entries of agc_driver_graphics_tests and agc_driver_tests pass on the CPU (2 GPU-only skips).

Performance (Afterimage PPSA14053 01.000.000, 3840x2160).

  • Scene: the first playable area with the character standing still at the "MOVE" tutorial. The scripted presses end at 422 s, and APS5_TRACE_SECONDS=450:4 (the only APS5_TRACE_*/APS5_PROFILE_* switch) captures 450–454 s. The screenshots at 452 s show the same frame in every run.
  • Libraries: both libSceAgcDriver.prx were built in one build directory (main SHA-256 4d6e2ebe…, this PR 46383e9d…); all other libraries and app.exe are identical.
  • Runs: caches were warm, each run started from a fresh save with the same scripted presses, and the runs alternated. Pairs are adjacent runs: main m2 with PR g1, and main m3 with PR g2. An earlier main run (m1) hit its time cap before its trace was written and is not used.
  • Image: both arms render the gameplay image blue (the layered colour LUT issue that #6959 fixes), so the colour is wrong on both but the work is the same.

The bundled reports use non-strict comparison. From an AnyPS5 checkout, with EVIDENCE set to the unpacked bundle directory:

python tools/performance_compare.py "$EVIDENCE/PPSA14053/ab-gpuclear-idle/m2/aps5-summary.jsonl" "$EVIDENCE/PPSA14053/ab-gpuclear-idle/g1/aps5-summary.jsonl"
python tools/performance_compare.py "$EVIDENCE/PPSA14053/ab-gpuclear-idle/m3/aps5-summary.jsonl" "$EVIDENCE/PPSA14053/ab-gpuclear-idle/g2/aps5-summary.jsonl"

The timed windows have run-specific window.first_present values (6027 vs 8892, and 5975 vs 8850), so --require-matching-context exits on that field. The recorded title, content, GPU, driver, OS, resolution and seconds 450:4 window match; screenshots verify the same stationary MOVE scene. No trace dropped events:

pair metric main this PR change
1 frame p50 / p90 / p99 ms 85.5 / 88.8 / 90.4 57.5 / 58.8 / 59.4 −32.7 % / −33.8 % / −34.3 %
1 mean frame ms 85.0 57.5 −32.4 %
1 GPU busy ms per present 35.8 32.1 −10.4 %
1 Graphics.Draw (draw committer) ms per frame 49.0 29.1 −40.5 %
2 frame p50 / p90 / p99 ms 85.7 / 90.5 / 91.7 57.6 / 58.9 / 60.0 −32.8 % / −35.0 % / −34.6 %
2 mean frame ms 86.2 57.6 −33.2 %
2 GPU busy ms per present 35.1 32.1 −8.5 %
2 Graphics.Draw ms per frame 55.1 29.4 −46.6 %

Each window holds 47–48 presents on main and 70 with this PR. This is independent of #13527, which makes FillDccClear itself cheaper for the surfaces that still use it.

Summary lines (pair 1 main, pair 1 PR, pair 2 main, pair 2 PR):

{"commit":"d3118d194631","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"450:4"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA14053","title":"Afterimage","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"seconds 450:4","first_present":6027,"ms":4078.017},"presents":48,"frame_ms":{"p50":85.462,"p90":88.777,"p99":90.404,"max":90.404},"gpu_busy_ms_per_present":35.801,"worker_busy_pct":{"queue worker 0x0":97.864},"top_phases_ms_per_frame":{"Driver.Packet":83.070,"Graphics.Draw":48.964,"Graphics.Draw.draw_and_resource_release":46.241,"Driver.Packet.pipeline_drain":31.880,"Driver.Packet.draw":27.235,"Driver.Draw":26.991,"Driver.Draw.shader_compile_and_link":22.045,"Shader.DrawStage":19.473},"trace_dropped":false,"trace":"aps5-trace-d3118d194631-51788.json.gz"}
{"commit":"a8202ea542c7","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"450:4"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA14053","title":"Afterimage","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"seconds 450:4","first_present":8892,"ms":4021.603},"presents":70,"frame_ms":{"p50":57.480,"p90":58.755,"p99":59.386,"max":59.386},"gpu_busy_ms_per_present":32.084,"worker_busy_pct":{"queue worker 0x0":96.796},"top_phases_ms_per_frame":{"Driver.Packet":55.535,"Graphics.Draw":29.121,"Driver.Packet.draw":26.632,"Driver.Draw":26.386,"Graphics.Draw.draw_and_resource_release":26.223,"Driver.Draw.shader_compile_and_link":21.569,"Shader.DrawStage":19.080,"Recorder.Sync":12.839},"trace_dropped":false,"trace":"aps5-trace-a8202ea542c7-1133100.json.gz"}
{"commit":"d3118d194631","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"450:4"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA14053","title":"Afterimage","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"seconds 450:4","first_present":5975,"ms":4051.235},"presents":47,"frame_ms":{"p50":85.685,"p90":90.483,"p99":91.693,"max":91.693},"gpu_busy_ms_per_present":35.098,"worker_busy_pct":{"queue worker 0x0":97.861},"top_phases_ms_per_frame":{"Driver.Packet":84.284,"Graphics.Draw":55.055,"Graphics.Draw.draw_and_resource_release":52.153,"Driver.Packet.pipeline_drain":32.556,"Driver.Packet.draw":27.104,"Driver.Draw":26.866,"Driver.Draw.shader_compile_and_link":21.736,"Shader.DrawStage":19.183},"trace_dropped":false,"trace":"aps5-trace-d3118d194631-867264.json.gz"}
{"commit":"a8202ea542c7","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"450:4"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA14053","title":"Afterimage","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"seconds 450:4","first_present":8850,"ms":4029.409},"presents":70,"frame_ms":{"p50":57.608,"p90":58.854,"p99":60.003,"max":60.003},"gpu_busy_ms_per_present":32.112,"worker_busy_pct":{"queue worker 0x0":96.864},"top_phases_ms_per_frame":{"Driver.Packet":55.691,"Graphics.Draw":29.396,"Driver.Packet.draw":26.794,"Driver.Draw":26.547,"Graphics.Draw.draw_and_resource_release":26.492,"Driver.Draw.shader_compile_and_link":21.517,"Shader.DrawStage":19.002,"Recorder.Sync":12.465},"trace_dropped":false,"trace":"aps5-trace-a8202ea542c7-1016792.json.gz"}

Traces, summaries, digests, comparisons, screenshots, library hashes, the harness scripts and both validation runs (result.json, ctest.log, ctest.xml, source.txt): afterimage-gpuclear-exact-head-20261031.tar.gz, SHA-256 002e2479f1bd372bab2e615b21d9e34025e9f503b4a1302390ab2cbbe38f92b7.

  • python tools/check_conventions.py --base origin/main: all checks passed.
  • Not run here: Linux, macOS. Eomm0 ran this head on Windows with NVIDIA (comment above).

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: PPSA14053 #9308 (intro frame rate)
  • GPUs tested: AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1, Windows 11 Enterprise 10.0.22621
  • AI-assisted: yes (Claude Code)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5091228976 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13648). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-30T21:25:50Z. --- ### What A sampled texture made from a surface whose DCC keys hold a fast-clear code goes through `cachedTexture`'s snapshot path, which costs: - `ReadTextureSurface` → `FillDccClear` writes the clear texel over the whole surface on the CPU; - the `Texture` constructor copies those bytes into a staging buffer; - the GPU copies them to a tiled buffer, detiles them, and copies them into the image. A target that is cleared every frame and sampled while cleared pays all of this each time it is looked up anew. Afterimage (PPSA14053, UE4) does this throughout its intro: `APS5_PROFILE_DRAW` counts about 330–800 key-driven clear uploads per 10 s there, and the draw committer is the critical path. This change clears the image with `vkCmdClearColorImage` instead, recorded in the same recorder batch the upload used. It applies when: - the texture's `SampledTextureFormat` is the format the clear texel is encoded in (`DccClearTextureFormat`); - the texel has an exact clear value (`ClearColorForTexel`, the conversion multisampled targets already use for their fast clears); - the texture is not a comparison, sRGB-expand, repacked or block-compressed texture, and the keys are not a register clear. Every other case keeps the upload. A clear-code cache entry keeps no snapshot: a clear-code hit never compares bytes (`ShaderResources.cpp`, the `*keys != Uncompressed && *keys != ClearSingle` hit), so the bytes were only an upload source. The `[textures]` line of `APS5_PROFILE_DRAW` counts these textures as "cleared on the GPU", and `SampledTexturesCleared()` reports them for the new test. **Test.** `tests/execution/SampledClearKeys.cpp` (`agc_driver_sampled_clear_keys`) samples a 128x128 RGBA8 64 KiB-tiled surface filled with `0x5a`: - with uncompressed keys it must read 90/255, made from the texels, with the counter unchanged; - with 1111 keys it must read 1.0 in every component, made by a GPU clear (counter +1); - with 0000 keys it must read 0.0, made by a GPU clear (counter +1). On the GPU, forcing the computed clear's red channel to 0.5 makes it fail with `1111 fast clear: component 0 of thread 0 is 0.501961 (0x3f008081), expected 1`. ### Tested Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, Radeon RX 6700 XT with AMD proprietary driver 26.10.1, WinLibs GCC 15.2.0 UCRT r7, Release, `BUILD_TESTING=ON`. Every result below is for this PR's head `a8202ea542` (`a8202ea542c7e0d749b5b7d419b5ec5188d54712`), against its parent `main` `d3118d1946` (`d3118d19463159be42daf0ae5ff7f16975dcc902`). **GPU tests under validation.** `ctest --repeat until-fail:3` with `VK_LAYER_KHRONOS_validation` 1.4.309, each SHA built and run on its own: | | head `a8202ea542` | `main` `d3118d1946` | |---|---|---| | CTest entries | 29 selected: 26 passed, 3 skipped | 28 selected: 25 passed, 3 skipped (no `agc_driver_sampled_clear_keys`) | | validation-layer insertions | 87 | 84 | | skipped on this device | `agc_driver_msaa_dcc_compared_import_2/4/8` | the same | | VUIDs | `VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605` | the same | The entries are the new test plus the 13 execution tests that use DCC keys: `AlphaToCoverage`, `ClampedGlobalFill`, `DccKeyPresync`, `DccKeysFirstWrite`, `DrawWriteRanges`, `FillCoverKeys`, `LayeredVolumeSubmit`, `MemoryValueFill`, `PresentKeyWriterWait`, `SampleMultisampleTarget`, `SgprPatternFillKeys`, `Srgb8ColorTarget` and `StagedClearSampledRead`. The one VUID comes from `agc_driver_srgb8_color_target` on both SHAs; it is #11990. Each run records its source SHA and the test executables' SHA-256 in `source.txt`. Forcing the computed clear's red channel to 0.5 makes the new test fail: `1111 fast clear: component 0 of thread 0 is 0.501961 (0x3f008081), expected 1`. The 42 CTest entries of `agc_driver_graphics_tests` and `agc_driver_tests` pass on the CPU (2 GPU-only skips). **Performance** (Afterimage PPSA14053 01.000.000, 3840x2160). - **Scene:** the first playable area with the character standing still at the "MOVE" tutorial. The scripted presses end at 422 s, and `APS5_TRACE_SECONDS=450:4` (the only `APS5_TRACE_*`/`APS5_PROFILE_*` switch) captures 450–454 s. The screenshots at 452 s show the same frame in every run. - **Libraries:** both `libSceAgcDriver.prx` were built in one build directory (`main` SHA-256 `4d6e2ebe…`, this PR `46383e9d…`); all other libraries and `app.exe` are identical. - **Runs:** caches were warm, each run started from a fresh save with the same scripted presses, and the runs alternated. Pairs are adjacent runs: `main` m2 with PR g1, and `main` m3 with PR g2. An earlier `main` run (m1) hit its time cap before its trace was written and is not used. - **Image:** both arms render the gameplay image blue (the layered colour LUT issue that #6959 fixes), so the colour is wrong on both but the work is the same. The bundled reports use non-strict comparison. From an AnyPS5 checkout, with `EVIDENCE` set to the unpacked bundle directory: ```sh python tools/performance_compare.py "$EVIDENCE/PPSA14053/ab-gpuclear-idle/m2/aps5-summary.jsonl" "$EVIDENCE/PPSA14053/ab-gpuclear-idle/g1/aps5-summary.jsonl" python tools/performance_compare.py "$EVIDENCE/PPSA14053/ab-gpuclear-idle/m3/aps5-summary.jsonl" "$EVIDENCE/PPSA14053/ab-gpuclear-idle/g2/aps5-summary.jsonl" ``` The timed windows have run-specific `window.first_present` values (6027 vs 8892, and 5975 vs 8850), so `--require-matching-context` exits on that field. The recorded title, content, GPU, driver, OS, resolution and `seconds 450:4` window match; screenshots verify the same stationary MOVE scene. No trace dropped events: | pair | metric | `main` | this PR | change | |---|---|---|---|---| | 1 | frame p50 / p90 / p99 ms | 85.5 / 88.8 / 90.4 | 57.5 / 58.8 / 59.4 | −32.7 % / −33.8 % / −34.3 % | | 1 | mean frame ms | 85.0 | 57.5 | −32.4 % | | 1 | GPU busy ms per present | 35.8 | 32.1 | −10.4 % | | 1 | `Graphics.Draw` (draw committer) ms per frame | 49.0 | 29.1 | −40.5 % | | 2 | frame p50 / p90 / p99 ms | 85.7 / 90.5 / 91.7 | 57.6 / 58.9 / 60.0 | −32.8 % / −35.0 % / −34.6 % | | 2 | mean frame ms | 86.2 | 57.6 | −33.2 % | | 2 | GPU busy ms per present | 35.1 | 32.1 | −8.5 % | | 2 | `Graphics.Draw` ms per frame | 55.1 | 29.4 | −46.6 % | Each window holds 47–48 presents on `main` and 70 with this PR. This is independent of #13527, which makes `FillDccClear` itself cheaper for the surfaces that still use it. Summary lines (pair 1 `main`, pair 1 PR, pair 2 `main`, pair 2 PR): ``` {"commit":"d3118d194631","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"450:4"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA14053","title":"Afterimage","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"seconds 450:4","first_present":6027,"ms":4078.017},"presents":48,"frame_ms":{"p50":85.462,"p90":88.777,"p99":90.404,"max":90.404},"gpu_busy_ms_per_present":35.801,"worker_busy_pct":{"queue worker 0x0":97.864},"top_phases_ms_per_frame":{"Driver.Packet":83.070,"Graphics.Draw":48.964,"Graphics.Draw.draw_and_resource_release":46.241,"Driver.Packet.pipeline_drain":31.880,"Driver.Packet.draw":27.235,"Driver.Draw":26.991,"Driver.Draw.shader_compile_and_link":22.045,"Shader.DrawStage":19.473},"trace_dropped":false,"trace":"aps5-trace-d3118d194631-51788.json.gz"} {"commit":"a8202ea542c7","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"450:4"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA14053","title":"Afterimage","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"seconds 450:4","first_present":8892,"ms":4021.603},"presents":70,"frame_ms":{"p50":57.480,"p90":58.755,"p99":59.386,"max":59.386},"gpu_busy_ms_per_present":32.084,"worker_busy_pct":{"queue worker 0x0":96.796},"top_phases_ms_per_frame":{"Driver.Packet":55.535,"Graphics.Draw":29.121,"Driver.Packet.draw":26.632,"Driver.Draw":26.386,"Graphics.Draw.draw_and_resource_release":26.223,"Driver.Draw.shader_compile_and_link":21.569,"Shader.DrawStage":19.080,"Recorder.Sync":12.839},"trace_dropped":false,"trace":"aps5-trace-a8202ea542c7-1133100.json.gz"} {"commit":"d3118d194631","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"450:4"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA14053","title":"Afterimage","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"seconds 450:4","first_present":5975,"ms":4051.235},"presents":47,"frame_ms":{"p50":85.685,"p90":90.483,"p99":91.693,"max":91.693},"gpu_busy_ms_per_present":35.098,"worker_busy_pct":{"queue worker 0x0":97.861},"top_phases_ms_per_frame":{"Driver.Packet":84.284,"Graphics.Draw":55.055,"Graphics.Draw.draw_and_resource_release":52.153,"Driver.Packet.pipeline_drain":32.556,"Driver.Packet.draw":27.104,"Driver.Draw":26.866,"Driver.Draw.shader_compile_and_link":21.736,"Shader.DrawStage":19.183},"trace_dropped":false,"trace":"aps5-trace-d3118d194631-867264.json.gz"} {"commit":"a8202ea542c7","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"450:4"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA14053","title":"Afterimage","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"seconds 450:4","first_present":8850,"ms":4029.409},"presents":70,"frame_ms":{"p50":57.608,"p90":58.854,"p99":60.003,"max":60.003},"gpu_busy_ms_per_present":32.112,"worker_busy_pct":{"queue worker 0x0":96.864},"top_phases_ms_per_frame":{"Driver.Packet":55.691,"Graphics.Draw":29.396,"Driver.Packet.draw":26.794,"Driver.Draw":26.547,"Graphics.Draw.draw_and_resource_release":26.492,"Driver.Draw.shader_compile_and_link":21.517,"Shader.DrawStage":19.002,"Recorder.Sync":12.465},"trace_dropped":false,"trace":"aps5-trace-a8202ea542c7-1016792.json.gz"} ``` Traces, summaries, digests, comparisons, screenshots, library hashes, the harness scripts and both validation runs (`result.json`, `ctest.log`, `ctest.xml`, `source.txt`): [afterimage-gpuclear-exact-head-20261031.tar.gz](https://github.com/JJenkx/AnyPS5/releases/download/gpu-cleared-texture-exact-head-20261031/afterimage-gpuclear-exact-head-20261031.tar.gz), SHA-256 `002e2479f1bd372bab2e615b21d9e34025e9f503b4a1302390ab2cbbe38f92b7`. - `python tools/check_conventions.py --base origin/main`: all checks passed. - Not run here: Linux, macOS. Eomm0 ran this head on Windows with NVIDIA (comment above). ### 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: PPSA14053 #9308 (intro frame rate) - [x] GPUs tested: AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1, Windows 11 Enterprise 10.0.22621 - [x] AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-10-30 21:40:28 +00:00 (Migrated from github.com)

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

Review: CHANGES_REQUESTED


Reviewed — changes requested

The implementation has a focused source test, but the required performance and Vulkan evidence does not establish results for the exact PR head or compare the required common tests against main.

What I ran

Reviewed head a8202ea542c7e0d749b5b7d419b5ec5188d54712 against PR base 58858dfce97d2b9f997aaaf51f56199410271df0. The no-build merge preview against target tip d4de5943f6890884107de9388d9654bf30841bac was clean. Environment: Debian 12, Linux x86-64, Python 3.11.2, Git 2.39.5, GCC 12.2.0. I did not configure, build, compile, or run C++ tests locally.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13648
git diff --check 58858dfce97d2b9f997aaaf51f56199410271df0...a8202ea542c7e0d749b5b7d419b5ec5188d54712
python3 tools/check_conventions.py --base 58858dfce97d2b9f997aaaf51f56199410271df0 --head a8202ea542c7e0d749b5b7d419b5ec5188d54712 --title 'perf(agc): clear a fast-cleared sampled texture on the GPU' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13648-a8202ea542c7/pr-body.md
python3 tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13648-a8202ea542c7/head-a8202ea542c7-9cbbfee5 --json core/libs/prx/libSceAgcDriver/tests/execution/SampledClearKeys.cpp
curl -fsSL https://github.com/JJenkx/AnyPS5/releases/download/gpu-cleared-texture-afterimage-20261030/afterimage-gpu-cleared-texture-ab-20261030.tar.gz -o /tmp/anyps5-13648-evidence.tar.gz
sha256sum /tmp/anyps5-13648-evidence.tar.gz
tar -xzf /tmp/anyps5-13648-evidence.tar.gz -C /tmp/anyps5-13648-evidence
for f in /tmp/anyps5-13648-evidence/PPSA14053/ab-gpuclear/{g1-gpuclear,m1-main-ab,g2-gpuclear,m2-main-ab}; do python3 tools/trace_digest.py "$f"/aps5-trace-*.json.gz --summary "$f/aps5-summary.jsonl" > "$f/verified-digest.md" || exit; done
python3 tools/performance_compare.py /tmp/anyps5-13648-evidence/PPSA14053/ab-gpuclear/m1-main-ab/aps5-summary.jsonl /tmp/anyps5-13648-evidence/PPSA14053/ab-gpuclear/g1-gpuclear/aps5-summary.jsonl --require-matching-context
python3 tools/performance_compare.py /tmp/anyps5-13648-evidence/PPSA14053/ab-gpuclear/m2-main-ab/aps5-summary.jsonl /tmp/anyps5-13648-evidence/PPSA14053/ab-gpuclear/g2-gpuclear/aps5-summary.jsonl --require-matching-context

Results

Check Result
Patch and repository conventions git diff --check passed with no output; conventions and PR template passed.
Current-base preview Clean against target tip d4de5943f6890884107de9388d9654bf30841bac; no dependency declared.
Test-registration heuristic One possible-unregistered-test warning. I confirmed the source is included by the tests/execution/*.cpp CMake glob at the reviewed head, so this is a false positive.
Performance evidence The attached bundle checksum matches 8691bcea00138e6275ed8bbd1685b6883a6f78fedd202250adef8622d2790116. I regenerated all four trace digests and both summary comparisons; recorded contexts match, but the candidate summary lines identify feb800995331, not reviewed head a8202ea542c7e0d749b5b7d419b5ec5188d54712. The Tested text separately names 5ff7a60c…. All four summaries report dropped trace events.
Vulkan validation evidence The attached gpuclear-dcc result reports three repetitions and 87 validation-layer insertions, with three device-specific tests skipped. The bundle has no corresponding main run, and the result does not identify the tested source SHA.
Hosted CI At final refresh, conventions, eligibility, intake, portability and report passed; Windows was pending; Linux and specialized jobs were skipped.
Precheck helpers The wrapper could not find the workspace-local ABI and test-quality scripts in its isolated checkout. No public exports changed; I ran the test-quality helper separately against this exact tree. This wrapper limitation is not a code failure.
Unedited output from the checks and bundle
All conventions checks passed.
8691bcea00138e6275ed8bbd1685b6883a6f78fedd202250adef8622d2790116  /tmp/anyps5-13648-evidence.tar.gz

Test-quality helper output:

{
  "findings": [
    {
      "path": "core/libs/prx/libSceAgcDriver/tests/execution/SampledClearKeys.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."
  ]
}

Regenerated digest headers:

**frames 1900:200** from present 1900: 200 presents, frame p50 59.4 / p90 62.6 / p99 69.0 / max 70.2 ms, GPU busy 37.4 ms per present
AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.22621, 3840x2160, commit feb800995331, dropped: yes

**frames 1900:200** from present 1900: 200 presents, frame p50 99.3 / p90 104.5 / p99 114.5 / max 117.9 ms, GPU busy 52.3 ms per present
AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.22621, 3840x2160, commit d3118d194631, dropped: yes

**frames 1900:200** from present 1900: 200 presents, frame p50 62.5 / p90 66.2 / p99 74.7 / max 88.4 ms, GPU busy 40.7 ms per present
AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.22621, 3840x2160, commit feb800995331, dropped: yes

**frames 1900:200** from present 1900: 200 presents, frame p50 100.9 / p90 106.8 / p99 113.9 / max 114.2 ms, GPU busy 54.6 ms per present
AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.22621, 3840x2160, commit d3118d194631, dropped: yes

Unedited output from the two performance_compare.py commands:

# Performance comparison

| Capture | Commit | Trace | Presents | Window (ms) |
| --- | --- | --- | ---: | ---: |
| baseline | d3118d194631 | aps5-trace-d3118d194631-1210764.json.gz | 200 | 19278.608 |
| candidate | feb800995331 | aps5-trace-feb800995331-1116556.json.gz | 200 | 11900.444 |

- Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine or scene.
- Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval.
- A missing top phase is unreported, not zero; its change is unavailable.
- baseline: trace events were dropped; the event trace omits some of the work included in phase totals.
- candidate: trace events were dropped; the event trace omits some of the work included in phase totals.

## Frame and GPU times (ms)

| Metric | Baseline | Candidate | Change | Change (%) |
| --- | ---: | ---: | ---: | ---: |
| frame_ms.p50 | 99.308 | 59.365 | -39.943 | -40.221 |
| frame_ms.p90 | 104.499 | 62.568 | -41.931 | -40.126 |
| frame_ms.p99 | 114.546 | 69.039 | -45.507 | -39.728 |
| frame_ms.max | 117.903 | 70.156 | -47.747 | -40.497 |
| mean_frame_ms | 96.393 | 59.502 | -36.891 | -38.271 |
| gpu_busy_ms_per_present | 52.349 | 37.392 | -14.957 | -28.572 |

## Top phases (ms per frame)

| Metric | Baseline | Candidate | Change | Change (%) |
| --- | ---: | ---: | ---: | ---: |
| Driver.Draw | 24.025 | 23.405 | -0.620 | -2.581 |
| Driver.Draw.shader_compile_and_link | 19.424 | 18.953 | -0.471 | -2.425 |
| Driver.Packet | 94.388 | 57.591 | -36.797 | -38.985 |
| Driver.Packet.draw | 24.246 | 23.622 | -0.624 | -2.574 |
| Driver.Packet.pipeline_drain | 33.850 | n/a | n/a | n/a |
| Graphics.Draw | 51.030 | 24.341 | -26.689 | -52.301 |
| Graphics.Draw.draw_and_resource_release | 48.472 | 21.939 | -26.533 | -54.739 |
| Recorder.Sync | 20.836 | 17.672 | -3.164 | -15.185 |
| Shader.DrawStage | n/a | 16.728 | n/a | n/a |

# Performance comparison

| Capture | Commit | Trace | Presents | Window (ms) |
| --- | --- | --- | ---: | ---: |
| baseline | d3118d194631 | aps5-trace-d3118d194631-389792.json.gz | 200 | 19740.788 |
| candidate | feb800995331 | aps5-trace-feb800995331-331560.json.gz | 200 | 12620.273 |

- Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine or scene.
- Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval.
- A missing top phase is unreported, not zero; its change is unavailable.
- baseline: trace events were dropped; the event trace omits some of the work included in phase totals.
- candidate: trace events were dropped; the event trace omits some of the work included in phase totals.

## Frame and GPU times (ms)

| Metric | Baseline | Candidate | Change | Change (%) |
| --- | ---: | ---: | ---: | ---: |
| frame_ms.p50 | 100.909 | 62.458 | -38.451 | -38.105 |
| frame_ms.p90 | 106.778 | 66.203 | -40.575 | -37.999 |
| frame_ms.p99 | 113.855 | 74.747 | -39.108 | -34.349 |
| frame_ms.max | 114.153 | 88.435 | -25.718 | -22.529 |
| mean_frame_ms | 98.704 | 63.101 | -35.603 | -36.070 |
| gpu_busy_ms_per_present | 54.647 | 40.693 | -13.954 | -25.535 |

## Top phases (ms per frame)

| Metric | Baseline | Candidate | Change | Change (%) |
| --- | ---: | ---: | ---: | ---: |
| Driver.Draw | 24.808 | 24.229 | -0.579 | -2.334 |
| Driver.Draw.shader_compile_and_link | 20.173 | 19.648 | -0.525 | -2.602 |
| Driver.Packet | 96.743 | 61.155 | -35.588 | -36.786 |
| Driver.Packet.draw | 25.032 | 24.444 | -0.588 | -2.349 |
| Driver.Packet.pipeline_drain | 33.211 | n/a | n/a | n/a |
| Graphics.Draw | 50.990 | 30.263 | -20.727 | -40.649 |
| Graphics.Draw.draw_and_resource_release | 48.452 | 27.624 | -20.828 | -42.987 |
| Recorder.Sync | 21.340 | 20.051 | -1.289 | -6.040 |
| Shader.DrawStage | n/a | 17.350 | n/a | n/a |

The precheck itself reported Conclusion: checks failed because its isolated archive lacked tools/pr_abi_audit.py and tools/pr_test_quality.py; its diff check, conventions, and live mergeability check passed. The hosted Windows job was still pending at final refresh.

Findings

Blocking

  • The performance capture is not tied to the reviewed head. The PR is at a8202ea542c7e0d749b5b7d419b5ec5188d54712, but the attached candidate summaries and regenerated digests identify feb800995331; the Tested text names 5ff7a60c…. These are not the PR head, and neither candidate short SHA resolves in the PR head repository. Since the PR title and body make a speed claim, the repository requires a main/change capture pair with summary lines and traces from the same machine and scene. Please attach a fresh candidate capture built from the reviewed head (or the new head after your update), with its matching summary line and trace digest output. The baseline can remain if it still represents the same main build and capture context.
  • The required AGC baseline validation is missing. Repository rules require the same focused Vulkan validation tests on main and the change, then comparison for newly introduced VUIDs. The bundle contains only one DCC-key test run, does not identify its source SHA, and has no main result. Please run the shared DCC-key test set that exists on both revisions with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation on the same machine/GPU; attach both exact-head logs, confirm the validation layer was inserted, and report the VUID comparison. Run the new sampled_clear_keys test on the PR head as well.

Non-blocking

  • The source-level test checks uncompressed, 1111, and 0000 keys and verifies both sampled values and the clear counter. The heuristic registration warning is resolved by the CMake glob. I found no additional source-level blocker in the inspected diff.

Sources

Not verified

  • I did not build or run C++ tests locally. The Windows hosted build was pending at final refresh; Linux and specialized CI jobs were skipped.
  • No exact-head main/PR Vulkan validation comparison is present. I did not run hardware, console, macOS or NVIDIA tests.
  • The author-reported RX 6700 XT run and packaged artifacts are evidence supplied by the PR author; I verified the bundle checksum, regenerated its trace digests/comparisons, and confirmed the captured candidate SHA differs from the PR head.

To get this to a good state

Update the performance and paired Vulkan validation evidence for the exact PR head, including raw commands, summaries, traces, digest output and the VUID comparison. I will rerun the same relevant no-build checks and inspect the evidence against the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5718959819 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13648#pullrequestreview-5718959819). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T21:40:28Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The implementation has a focused source test, but the required performance and Vulkan evidence does not establish results for the exact PR head or compare the required common tests against `main`. ## What I ran Reviewed head `a8202ea542c7e0d749b5b7d419b5ec5188d54712` against PR base `58858dfce97d2b9f997aaaf51f56199410271df0`. The no-build merge preview against target tip `d4de5943f6890884107de9388d9654bf30841bac` was clean. Environment: Debian 12, Linux x86-64, Python 3.11.2, Git 2.39.5, GCC 12.2.0. I did not configure, build, compile, or run C++ tests locally. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13648 git diff --check 58858dfce97d2b9f997aaaf51f56199410271df0...a8202ea542c7e0d749b5b7d419b5ec5188d54712 python3 tools/check_conventions.py --base 58858dfce97d2b9f997aaaf51f56199410271df0 --head a8202ea542c7e0d749b5b7d419b5ec5188d54712 --title 'perf(agc): clear a fast-cleared sampled texture on the GPU' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13648-a8202ea542c7/pr-body.md python3 tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13648-a8202ea542c7/head-a8202ea542c7-9cbbfee5 --json core/libs/prx/libSceAgcDriver/tests/execution/SampledClearKeys.cpp curl -fsSL https://github.com/JJenkx/AnyPS5/releases/download/gpu-cleared-texture-afterimage-20261030/afterimage-gpu-cleared-texture-ab-20261030.tar.gz -o /tmp/anyps5-13648-evidence.tar.gz sha256sum /tmp/anyps5-13648-evidence.tar.gz tar -xzf /tmp/anyps5-13648-evidence.tar.gz -C /tmp/anyps5-13648-evidence for f in /tmp/anyps5-13648-evidence/PPSA14053/ab-gpuclear/{g1-gpuclear,m1-main-ab,g2-gpuclear,m2-main-ab}; do python3 tools/trace_digest.py "$f"/aps5-trace-*.json.gz --summary "$f/aps5-summary.jsonl" > "$f/verified-digest.md" || exit; done python3 tools/performance_compare.py /tmp/anyps5-13648-evidence/PPSA14053/ab-gpuclear/m1-main-ab/aps5-summary.jsonl /tmp/anyps5-13648-evidence/PPSA14053/ab-gpuclear/g1-gpuclear/aps5-summary.jsonl --require-matching-context python3 tools/performance_compare.py /tmp/anyps5-13648-evidence/PPSA14053/ab-gpuclear/m2-main-ab/aps5-summary.jsonl /tmp/anyps5-13648-evidence/PPSA14053/ab-gpuclear/g2-gpuclear/aps5-summary.jsonl --require-matching-context ``` ## Results | Check | Result | |---|---| | Patch and repository conventions | `git diff --check` passed with no output; conventions and PR template passed. | | Current-base preview | Clean against target tip `d4de5943f6890884107de9388d9654bf30841bac`; no dependency declared. | | Test-registration heuristic | One possible-unregistered-test warning. I confirmed the source is included by the `tests/execution/*.cpp` CMake glob at the reviewed head, so this is a false positive. | | Performance evidence | The attached bundle checksum matches `8691bcea00138e6275ed8bbd1685b6883a6f78fedd202250adef8622d2790116`. I regenerated all four trace digests and both summary comparisons; recorded contexts match, but the candidate summary lines identify `feb800995331`, not reviewed head `a8202ea542c7e0d749b5b7d419b5ec5188d54712`. The Tested text separately names `5ff7a60c…`. All four summaries report dropped trace events. | | Vulkan validation evidence | The attached `gpuclear-dcc` result reports three repetitions and 87 validation-layer insertions, with three device-specific tests skipped. The bundle has no corresponding `main` run, and the result does not identify the tested source SHA. | | Hosted CI | At final refresh, conventions, eligibility, intake, portability and report passed; Windows was pending; Linux and specialized jobs were skipped. | | Precheck helpers | The wrapper could not find the workspace-local ABI and test-quality scripts in its isolated checkout. No public exports changed; I ran the test-quality helper separately against this exact tree. This wrapper limitation is not a code failure. | <details> <summary>Unedited output from the checks and bundle</summary> ```text All conventions checks passed. 8691bcea00138e6275ed8bbd1685b6883a6f78fedd202250adef8622d2790116 /tmp/anyps5-13648-evidence.tar.gz ``` Test-quality helper output: ```json { "findings": [ { "path": "core/libs/prx/libSceAgcDriver/tests/execution/SampledClearKeys.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." ] } ``` Regenerated digest headers: ```text **frames 1900:200** from present 1900: 200 presents, frame p50 59.4 / p90 62.6 / p99 69.0 / max 70.2 ms, GPU busy 37.4 ms per present AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.22621, 3840x2160, commit feb800995331, dropped: yes **frames 1900:200** from present 1900: 200 presents, frame p50 99.3 / p90 104.5 / p99 114.5 / max 117.9 ms, GPU busy 52.3 ms per present AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.22621, 3840x2160, commit d3118d194631, dropped: yes **frames 1900:200** from present 1900: 200 presents, frame p50 62.5 / p90 66.2 / p99 74.7 / max 88.4 ms, GPU busy 40.7 ms per present AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.22621, 3840x2160, commit feb800995331, dropped: yes **frames 1900:200** from present 1900: 200 presents, frame p50 100.9 / p90 106.8 / p99 113.9 / max 114.2 ms, GPU busy 54.6 ms per present AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.22621, 3840x2160, commit d3118d194631, dropped: yes ``` Unedited output from the two `performance_compare.py` commands: ```text # Performance comparison | Capture | Commit | Trace | Presents | Window (ms) | | --- | --- | --- | ---: | ---: | | baseline | d3118d194631 | aps5-trace-d3118d194631-1210764.json.gz | 200 | 19278.608 | | candidate | feb800995331 | aps5-trace-feb800995331-1116556.json.gz | 200 | 11900.444 | - Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine or scene. - Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval. - A missing top phase is unreported, not zero; its change is unavailable. - baseline: trace events were dropped; the event trace omits some of the work included in phase totals. - candidate: trace events were dropped; the event trace omits some of the work included in phase totals. ## Frame and GPU times (ms) | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | frame_ms.p50 | 99.308 | 59.365 | -39.943 | -40.221 | | frame_ms.p90 | 104.499 | 62.568 | -41.931 | -40.126 | | frame_ms.p99 | 114.546 | 69.039 | -45.507 | -39.728 | | frame_ms.max | 117.903 | 70.156 | -47.747 | -40.497 | | mean_frame_ms | 96.393 | 59.502 | -36.891 | -38.271 | | gpu_busy_ms_per_present | 52.349 | 37.392 | -14.957 | -28.572 | ## Top phases (ms per frame) | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | Driver.Draw | 24.025 | 23.405 | -0.620 | -2.581 | | Driver.Draw.shader_compile_and_link | 19.424 | 18.953 | -0.471 | -2.425 | | Driver.Packet | 94.388 | 57.591 | -36.797 | -38.985 | | Driver.Packet.draw | 24.246 | 23.622 | -0.624 | -2.574 | | Driver.Packet.pipeline_drain | 33.850 | n/a | n/a | n/a | | Graphics.Draw | 51.030 | 24.341 | -26.689 | -52.301 | | Graphics.Draw.draw_and_resource_release | 48.472 | 21.939 | -26.533 | -54.739 | | Recorder.Sync | 20.836 | 17.672 | -3.164 | -15.185 | | Shader.DrawStage | n/a | 16.728 | n/a | n/a | # Performance comparison | Capture | Commit | Trace | Presents | Window (ms) | | --- | --- | --- | ---: | ---: | | baseline | d3118d194631 | aps5-trace-d3118d194631-389792.json.gz | 200 | 19740.788 | | candidate | feb800995331 | aps5-trace-feb800995331-331560.json.gz | 200 | 12620.273 | - Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine or scene. - Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval. - A missing top phase is unreported, not zero; its change is unavailable. - baseline: trace events were dropped; the event trace omits some of the work included in phase totals. - candidate: trace events were dropped; the event trace omits some of the work included in phase totals. ## Frame and GPU times (ms) | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | frame_ms.p50 | 100.909 | 62.458 | -38.451 | -38.105 | | frame_ms.p90 | 106.778 | 66.203 | -40.575 | -37.999 | | frame_ms.p99 | 113.855 | 74.747 | -39.108 | -34.349 | | frame_ms.max | 114.153 | 88.435 | -25.718 | -22.529 | | mean_frame_ms | 98.704 | 63.101 | -35.603 | -36.070 | | gpu_busy_ms_per_present | 54.647 | 40.693 | -13.954 | -25.535 | ## Top phases (ms per frame) | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | Driver.Draw | 24.808 | 24.229 | -0.579 | -2.334 | | Driver.Draw.shader_compile_and_link | 20.173 | 19.648 | -0.525 | -2.602 | | Driver.Packet | 96.743 | 61.155 | -35.588 | -36.786 | | Driver.Packet.draw | 25.032 | 24.444 | -0.588 | -2.349 | | Driver.Packet.pipeline_drain | 33.211 | n/a | n/a | n/a | | Graphics.Draw | 50.990 | 30.263 | -20.727 | -40.649 | | Graphics.Draw.draw_and_resource_release | 48.452 | 27.624 | -20.828 | -42.987 | | Recorder.Sync | 21.340 | 20.051 | -1.289 | -6.040 | | Shader.DrawStage | n/a | 17.350 | n/a | n/a | ``` The precheck itself reported `Conclusion: checks failed` because its isolated archive lacked `tools/pr_abi_audit.py` and `tools/pr_test_quality.py`; its diff check, conventions, and live mergeability check passed. The hosted Windows job was still pending at final refresh. </details> ## Findings ### Blocking - **The performance capture is not tied to the reviewed head.** The PR is at `a8202ea542c7e0d749b5b7d419b5ec5188d54712`, but the attached candidate summaries and regenerated digests identify `feb800995331`; the Tested text names `5ff7a60c…`. These are not the PR head, and neither candidate short SHA resolves in the PR head repository. Since the PR title and body make a speed claim, the repository requires a main/change capture pair with summary lines and traces from the same machine and scene. Please attach a fresh candidate capture built from the reviewed head (or the new head after your update), with its matching summary line and trace digest output. The baseline can remain if it still represents the same main build and capture context. - **The required AGC baseline validation is missing.** Repository rules require the same focused Vulkan validation tests on `main` and the change, then comparison for newly introduced VUIDs. The bundle contains only one DCC-key test run, does not identify its source SHA, and has no `main` result. Please run the shared DCC-key test set that exists on both revisions with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` on the same machine/GPU; attach both exact-head logs, confirm the validation layer was inserted, and report the VUID comparison. Run the new `sampled_clear_keys` test on the PR head as well. ### Non-blocking - The source-level test checks uncompressed, `1111`, and `0000` keys and verifies both sampled values and the clear counter. The heuristic registration warning is resolved by the CMake glob. I found no additional source-level blocker in the inspected diff. ## Sources - [AGC and performance evidence requirements at the PR base](https://github.com/boykopovar/AnyPS5/blob/58858dfce97d2b9f997aaaf51f56199410271df0/CONTRIBUTING.md#L68-L70) - [Performance capture instructions at the PR base](https://github.com/boykopovar/AnyPS5/blob/58858dfce97d2b9f997aaaf51f56199410271df0/.github/ISSUE_TEMPLATE/performance.yml) - [Changed texture clear path at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/a8202ea542c7e0d749b5b7d419b5ec5188d54712/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp) - [New sampled-clear test at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/a8202ea542c7e0d749b5b7d419b5ec5188d54712/core/libs/prx/libSceAgcDriver/tests/execution/SampledClearKeys.cpp) - [CMake registration glob at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/a8202ea542c7e0d749b5b7d419b5ec5188d54712/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L2440) ## Not verified - I did not build or run C++ tests locally. The Windows hosted build was pending at final refresh; Linux and specialized CI jobs were skipped. - No exact-head `main`/PR Vulkan validation comparison is present. I did not run hardware, console, macOS or NVIDIA tests. - The author-reported RX 6700 XT run and packaged artifacts are evidence supplied by the PR author; I verified the bundle checksum, regenerated its trace digests/comparisons, and confirmed the captured candidate SHA differs from the PR head. ## To get this to a good state Update the performance and paired Vulkan validation evidence for the exact PR head, including raw commands, summaries, traces, digest output and the VUID comparison. I will rerun the same relevant no-build checks and inspect the evidence against the new head.
MarcZX10 commented 2026-10-31 01:39:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T01:39:12Z.

Review: APPROVED


Reviewed — looks good

The exact-head performance captures and paired Vulkan logs address the earlier evidence gaps; I found no blocking source issue in the reviewed change.

What I ran

Reviewed head a8202ea542c7e0d749b5b7d419b5ec5188d54712, based on 58858dfce97d2b9f997aaaf51f56199410271df0. The precheck's current-main merge preview was clean. Environment: Debian Linux, Python 3.11.2; I did not build or compile AnyPS5.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13648
python3 tools/performance_compare.py --require-matching-context --baseline-trace aps5-trace-d3118d194631-51788.json.gz --candidate-trace aps5-trace-a8202ea542c7-1133100.json.gz <m2-summary.jsonl> <g1-summary.jsonl>
python3 tools/trace_digest.py <each of the four supplied traces>
python3 /root/.codex/skills/anyps5-pr-review/scripts/compare_vulkan_logs.py <main-ctest.log> <pr-ctest.log>

The capture and CTest artifacts were supplied by the author. I checked their SHA/source records, reran all four trace digests, and compared the UTF-8-decoded CTest logs. The reports identify Windows 11, Ryzen 9 5950X, Radeon RX 6700 XT, and AMD driver 26.10.1; I did not independently run on that machine.

Results

Check Result
Diff, conventions, dependency/mergeability Passed; precheck reports a clean current-main merge preview. Its ABI and test-quality helper invocations could not run because those helpers are absent from the isolated PR checkout; they are workspace-only tools.
Four trace digests Each regenerated digest matched its bundled trace-digest.md.
Paired Vulkan validation logs No missing-layer marker; no new/increased VUID. VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 occurs 18 times in each log.
Paired performance captures Two author-provided pairs identify baseline d3118d194631 and exact PR head a8202ea542c7; reported p50 changes are −32.7% and −32.8%, with GPU-busy changes −10.4% and −8.5%. The recorded title, content, GPU, driver, OS, resolution and timed capture window match.
Hosted CI Windows, conventions, portability, intake, labels and report checks pass. Linux and specialized jobs are skipped.
Selected raw output
performance_compare.py: recorded configuration differs: window.first_present
Vulkan validation log comparison (derived from supplied logs; does not verify how they were produced).

- Layer-not-found error marker present in baseline: no.
- Layer-not-found error marker present in candidate: no.
- VUID IDs newly present or more frequent in candidate: 0.

| VUID | Baseline occurrences | Candidate occurrences | Result |
|---|---:|---:|---|
| `VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605` | 18 | 18 | unchanged |

Outcome: **no new or increased VUID IDs detected** in these logs.

Negative control

Assertion Mutation Outcome
agc_driver_sampled_clear_keys checks the fast-clear sampled value Author reports forcing the computed red channel to 0.5 Author reports the test fails with the expected component mismatch; I did not independently rerun this mutation.

Findings

Blocking

None found in the reviewed source or the supplied exact-head evidence.

Non-blocking

  • The CTest XML records 26 passed and 3 skipped on the PR head, and 25 passed and 3 skipped on main. The PR description says “29 passed” and “28 passed”; please distinguish selected tests from tests actually run.
  • The documented --require-matching-context command exits because window.first_present differs between timed runs. The supplied comparison reports still provide the pair metrics; please make the command reproducible by using the non-strict comparison invocation and noting that the present index is run-specific.

Sources

Not verified

No local build, C++ test run, console test, or independent GPU/performance capture was performed. The GPU captures, Vulkan runs, and mutation result are author-provided; I verified the supplied revisions, digests and logs.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5720397662 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13648#pullrequestreview-5720397662). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T01:39:12Z. **Review:** APPROVED --- # Reviewed — looks good The exact-head performance captures and paired Vulkan logs address the earlier evidence gaps; I found no blocking source issue in the reviewed change. ## What I ran Reviewed head `a8202ea542c7e0d749b5b7d419b5ec5188d54712`, based on `58858dfce97d2b9f997aaaf51f56199410271df0`. The precheck's current-main merge preview was clean. Environment: Debian Linux, Python 3.11.2; I did not build or compile AnyPS5. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13648 python3 tools/performance_compare.py --require-matching-context --baseline-trace aps5-trace-d3118d194631-51788.json.gz --candidate-trace aps5-trace-a8202ea542c7-1133100.json.gz <m2-summary.jsonl> <g1-summary.jsonl> python3 tools/trace_digest.py <each of the four supplied traces> python3 /root/.codex/skills/anyps5-pr-review/scripts/compare_vulkan_logs.py <main-ctest.log> <pr-ctest.log> ``` The capture and CTest artifacts were supplied by the author. I checked their SHA/source records, reran all four trace digests, and compared the UTF-8-decoded CTest logs. The reports identify Windows 11, Ryzen 9 5950X, Radeon RX 6700 XT, and AMD driver 26.10.1; I did not independently run on that machine. ## Results | Check | Result | |---|---| | Diff, conventions, dependency/mergeability | Passed; precheck reports a clean current-main merge preview. Its ABI and test-quality helper invocations could not run because those helpers are absent from the isolated PR checkout; they are workspace-only tools. | | Four trace digests | Each regenerated digest matched its bundled `trace-digest.md`. | | Paired Vulkan validation logs | No missing-layer marker; no new/increased VUID. `VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605` occurs 18 times in each log. | | Paired performance captures | Two author-provided pairs identify baseline `d3118d194631` and exact PR head `a8202ea542c7`; reported p50 changes are −32.7% and −32.8%, with GPU-busy changes −10.4% and −8.5%. The recorded title, content, GPU, driver, OS, resolution and timed capture window match. | | Hosted CI | Windows, conventions, portability, intake, labels and report checks pass. Linux and specialized jobs are skipped. | <details><summary>Selected raw output</summary> ```text performance_compare.py: recorded configuration differs: window.first_present ``` ```text Vulkan validation log comparison (derived from supplied logs; does not verify how they were produced). - Layer-not-found error marker present in baseline: no. - Layer-not-found error marker present in candidate: no. - VUID IDs newly present or more frequent in candidate: 0. | VUID | Baseline occurrences | Candidate occurrences | Result | |---|---:|---:|---| | `VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605` | 18 | 18 | unchanged | Outcome: **no new or increased VUID IDs detected** in these logs. ``` </details> ## Negative control | Assertion | Mutation | Outcome | |---|---|---| | `agc_driver_sampled_clear_keys` checks the fast-clear sampled value | Author reports forcing the computed red channel to 0.5 | Author reports the test fails with the expected component mismatch; I did not independently rerun this mutation. | ## Findings ### Blocking None found in the reviewed source or the supplied exact-head evidence. ### Non-blocking - The CTest XML records 26 passed and 3 skipped on the PR head, and 25 passed and 3 skipped on main. The PR description says “29 passed” and “28 passed”; please distinguish selected tests from tests actually run. - The documented `--require-matching-context` command exits because `window.first_present` differs between timed runs. The supplied comparison reports still provide the pair metrics; please make the command reproducible by using the non-strict comparison invocation and noting that the present index is run-specific. ## Sources - [Changed sampled-clear implementation at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/a8202ea542c7e0d749b5b7d419b5ec5188d54712/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp) and [the sampled-clear regression test](https://github.com/boykopovar/AnyPS5/blob/a8202ea542c7e0d749b5b7d419b5ec5188d54712/core/libs/prx/libSceAgcDriver/tests/execution/SampledClearKeys.cpp) - [AGC validation and performance evidence rules at the PR base](https://github.com/boykopovar/AnyPS5/blob/58858dfce97d2b9f997aaaf51f56199410271df0/CONTRIBUTING.md) - [Performance report instructions](https://github.com/boykopovar/AnyPS5/blob/58858dfce97d2b9f997aaaf51f56199410271df0/.github/ISSUE_TEMPLATE/performance.yml) ## Not verified No local build, C++ test run, console test, or independent GPU/performance capture was performed. The GPU captures, Vulkan runs, and mutation result are author-provided; I verified the supplied revisions, digests and logs.
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!13648
No description provided.