perf(agc): order a storage flush behind its GPU writer when the write-back is a GPU copy #15569

Merged
milescoviello merged 7 commits from upstream-pr/15569 into main 2026-11-10 05:36:29 +00:00
milescoviello commented 2026-11-03 19:13:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-11-03T19:13:19Z.


What

A label's readback store (StoreReadbackBeforeLabel) and a storage refresh (StorageTexture::refresh) flush the pending storage images over their range before they go on. FlushPending waited on the CPU for the images' GPU writers first. When every flushed image lives in a host import, its write-back is a copy the recorder records into the import. That copy runs after the image's writer and before anything recorded later, including the label, so the wait adds nothing to the order. Ghost of Tsushima (PPSA02225) paid about 55 ms for it once a frame. A sampled 4K storage surface overlapped six pending images of a transient heap, and its refresh drained the whole recorder.

How

  • StoreReadbackBeforeLabel and an eligible refresh set a thread-local scope. Inside it, FlushPending skips the wait for the GPU writer when the recorder is active, the call is not in a completion, and every image it flushes has a host import (HostImportFor). The write-backs are then recorded behind their writers as before.
  • A refresh is eligible when it is not scoped, has no alias or key hand-over, no DCC metadata, no layer still pending, and its own image has a host import. When the flush skipped the wait, the guest bytes the refresh would compare are still in flight, so the refresh doesn't compare them. It marks every tracked layer changed and re-uploads the layers from the import, a GPU copy recorded after the write-backs.
  • APS5_NO_FLUSH_GPU_ORDERED=1 and APS5_NO_REFRESH_GPU_ORDERED=1 restore the waits.

Tested

  • New agc_driver_label_ordered_flush: a compute image_store into an imported 128x128 R32UI surface, a small storage image (64 KiB, the size a label stores before it), followed directly by a RELEASE_MEM label while the store is still pending on the GPU. When the label lands, the stored texels must be in guest memory. 8 runs per test; the test checks that the surface is small.
  • Since b6007f69a9, StorageTexture::TakeOrderedSkipCounts() counts the skips taken, and the tests check them:
    • agc_driver_label_ordered_flush covers the label half (at least one flush skip) and the refresh half. For the refresh half, a 256x64 linear R32UI view of the block reads after a 128x128 tiled store over the whole block is left pending. The view isn't an alias, so its refresh flushes the store, and every texel read must equal the stored value and guest memory. The half requires at least one refresh skip.
    • agc_driver_label_ordered_flush_disabled (APS5_NO_FLUSH_GPU_ORDERED=1 APS5_NO_REFRESH_GPU_ORDERED=1) and _unimported (APS5_NO_HOST_IMPORT=1) run the same scenarios. They require zero skips and the same results.
    • agc_driver_ordered_refresh_failure injects a FlushPending failure inside an armed refresh (SetFlushFailureForTest). It checks that the flag is cleared on the thread and that the next flush waits.
  • GoT, local stack (the same change on an older base, with other GoT experiments), warm, same route, 1200 s runs:
    • Before: 2.38-2.45 fps, one ~55 ms Recorder::Sync per frame from StorageTexture::refresh -> FlushPending (APS5_TRACE_LONG_SYNCS).
    • Run 265, with both: 2.87 fps, p50 346 ms. 5 syncs of 50 ms or more in 785 s, against one per frame. Run 264, with only the flush half: 2.53 fps. Run 271, a clean measure with no traces: 2.90 fps, p50 343 ms.
    • Frames unchanged against the runs without it.
  • ASTRO BOT (PPSA21567 01.019.000), Crash Site, main 086c0686c8 against the same main + this PR, measured by @TripyFox (comment). Windows 11, RTX 5090 (NVIDIA 621.01), 3840x2160, warm shader cache, three interleaved 240 s pairs with APS5_TRACE_SUMMARY_EVERY=10 APS5_TRACE_BENCH=1:
    • p50 92.7 -> 84.2 ms (-9.2 %), p99 108.5 -> 92.0 ms, presents 108.0 -> 120.3 per 10 s (+11.4 %), GPU busy 73.6 -> 72.8 ms per present. The fastest main run is slower than the slowest PR run.
    • Recorder syncs per 10 s fall from 4209 to 3157, and pending-write syncs from 1792 to 472. The storage write-back and upload volumes are unchanged.
    • Most of the gain comes from the label half. APS5_NO_FLUSH_GPU_ORDERED=1 gives back most of it; APS5_NO_REFRESH_GPU_ORDERED=1 gives back about 1 ms.
    • A confirmation pair on head 2da15973ce gives the same size: p50 -6 ms in every compared interval.
    • On the current head, @TripyFox measured main b11c7bf84f against b6007f6 merged onto it (comment). Only libSceAgcDriver.prx differs between the builds. The setup was 240 s runs with a warm cache, two interleaved rounds, and medians of the 10 s intervals from 40 s to 240 s, with APS5_TRACE_SUMMARY_EVERY=10 APS5_TRACE_BENCH=1:
Run presents / 10 s frame p50 ms p99 ms GPU busy / present ms
main, round 1 110.8 90.01 108.88 70.38
change, round 1 122.7 82.79 92.06 70.45
main, round 2 110.5 91.06 104.54 72.81
change, round 2 120.5 84.39 90.58 72.73
  • tools/performance_compare.py on the two summary lines below (interval from 100 s, round 1): frame p50 -8.3 ms (-9.1 %), p99 -22.9 ms, GPU busy -0.6 ms. The only configuration difference it lists is window.first_present.
  • Summary line, main:
{"commit":"b11c7bf84f5d","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_TRACE_BENCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 621.01","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 9800X3D 8-Core Processor","cpu_threads":16,"memory_mib":65140,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":1641,"ms":10040.788},"interval_start_s":100.904,"interval_end_s":110.945,"presents":110,"frame_ms":{"p50":90.588,"p90":100.512,"p99":114.130,"max":118.423},"gpu_busy_ms_per_present":70.925,"worker_busy_pct":{"queue worker 0x0":97.787,"queue worker 0x40":99.954,"queue worker 0x48":100.058,"queue worker 0x46":2.206},"top_phases_ms_per_frame":{"Driver.Packet":272.861,"Driver.Packet.memory_wait":159.319,"Driver.Packet.draw":55.195,"Driver.Draw":54.820,"Graphics.Draw":46.451,"Graphics.Draw.draw_and_resource_release":37.184,"Driver.Draw.shader_compile_and_link":29.343,"Shader.DrawStage":24.561},"trace_dropped":false,"trace":""}
  • Summary line, this change:
{"commit":"78693efa462b","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_TRACE_BENCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 621.01","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 9800X3D 8-Core Processor","cpu_threads":16,"memory_mib":65140,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":1452,"ms":10065.337},"interval_start_s":100.957,"interval_end_s":111.022,"presents":124,"frame_ms":{"p50":82.300,"p90":86.826,"p99":91.225,"max":94.329},"gpu_busy_ms_per_present":70.315,"worker_busy_pct":{"queue worker 0x0":97.584,"queue worker 0x40":99.964,"queue worker 0x48":99.992,"queue worker 0x46":1.450},"top_phases_ms_per_frame":{"Driver.Packet":241.869,"Driver.Packet.memory_wait":142.862,"Graphics.Draw":47.769,"Driver.Packet.draw":47.312,"Driver.Draw":46.912,"Graphics.Draw.draw_and_resource_release":38.622,"Driver.Draw.shader_compile_and_link":26.900,"Driver.Packet.prepare_memory":22.820},"trace_dropped":false,"trace":""}
  • These runs used the bench summaries, so no .json.gz traces are attached.
  • Focused tests at b6007f69a9: the four tests above plus agc_driver_direct_write_completion, agc_driver_linear_target_direct_write_completion, agc_driver_fill_completion_labels, agc_driver_linear_target_completion_points and agc_driver_memory_value_fill.
Where Result
Linux, RTX 4070 Ti, driver 615.71.09 9 of 9 pass in each of 3 runs
Windows 11 VM, GT 1030, driver 582.78 at b6007f69a9: 8 of 9 pass in each of 3 runs, including all four new tests. The failure is agc_driver_direct_write_completion, which also fails on main 1c8c0efc8c there in each of 3 runs (#15564, fixed by #15610)
Khronos validation 1.4.341, re-run 11-09 with VK_LOADER_DEBUG=layer, base 1c8c0efc8c vs head b6007f69a9 4 of 4 and 6 of 6 pass; the loader inserted the layer for each of the 7 and 11 Vulkan devices; no VUID-. This replaces a 1.4.363 run whose layer load can't be confirmed: the layer directory it used was gone, and without VK_LOADER_DEBUG a missing layer leaves no trace in the log (#17896)

Overlap: #12070 also changes FlushPending's writer wait: it skips waiting for an image's own stamped writes. Both skip the wait on different conditions, so they compose. The second to land rebases the wait condition. No open PR changes StoreReadbackBeforeLabel or the refresh compare.

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
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 615.71.09, Ubuntu 26.04.1; NVIDIA GeForce GT 1030, driver 582.78, Windows 11 VM
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5143072253 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15569). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-11-03T19:13:19Z. --- ### What A label's readback store (`StoreReadbackBeforeLabel`) and a storage refresh (`StorageTexture::refresh`) flush the pending storage images over their range before they go on. `FlushPending` waited on the CPU for the images' GPU writers first. When every flushed image lives in a host import, its write-back is a copy the recorder records into the import. That copy runs after the image's writer and before anything recorded later, including the label, so the wait adds nothing to the order. Ghost of Tsushima (PPSA02225) paid about 55 ms for it once a frame. A sampled 4K storage surface overlapped six pending images of a transient heap, and its refresh drained the whole recorder. ### How - `StoreReadbackBeforeLabel` and an eligible `refresh` set a thread-local scope. Inside it, `FlushPending` skips the wait for the GPU writer when the recorder is active, the call is not in a completion, and every image it flushes has a host import (`HostImportFor`). The write-backs are then recorded behind their writers as before. - A refresh is eligible when it is not scoped, has no alias or key hand-over, no DCC metadata, no layer still pending, and its own image has a host import. When the flush skipped the wait, the guest bytes the refresh would compare are still in flight, so the refresh doesn't compare them. It marks every tracked layer changed and re-uploads the layers from the import, a GPU copy recorded after the write-backs. - `APS5_NO_FLUSH_GPU_ORDERED=1` and `APS5_NO_REFRESH_GPU_ORDERED=1` restore the waits. ### Tested - New `agc_driver_label_ordered_flush`: a compute `image_store` into an imported 128x128 R32UI surface, a small storage image (64 KiB, the size a label stores before it), followed directly by a `RELEASE_MEM` label while the store is still pending on the GPU. When the label lands, the stored texels must be in guest memory. 8 runs per test; the test checks that the surface is small. - Since `b6007f69a9`, `StorageTexture::TakeOrderedSkipCounts()` counts the skips taken, and the tests check them: - `agc_driver_label_ordered_flush` covers the label half (at least one flush skip) and the refresh half. For the refresh half, a 256x64 linear R32UI view of the block reads after a 128x128 tiled store over the whole block is left pending. The view isn't an alias, so its refresh flushes the store, and every texel read must equal the stored value and guest memory. The half requires at least one refresh skip. - `agc_driver_label_ordered_flush_disabled` (`APS5_NO_FLUSH_GPU_ORDERED=1 APS5_NO_REFRESH_GPU_ORDERED=1`) and `_unimported` (`APS5_NO_HOST_IMPORT=1`) run the same scenarios. They require zero skips and the same results. - `agc_driver_ordered_refresh_failure` injects a `FlushPending` failure inside an armed refresh (`SetFlushFailureForTest`). It checks that the flag is cleared on the thread and that the next flush waits. - GoT, local stack (the same change on an older base, with other GoT experiments), warm, same route, 1200 s runs: - Before: 2.38-2.45 fps, one ~55 ms `Recorder::Sync` per frame from `StorageTexture::refresh -> FlushPending` (`APS5_TRACE_LONG_SYNCS`). - Run 265, with both: 2.87 fps, p50 346 ms. 5 syncs of 50 ms or more in 785 s, against one per frame. Run 264, with only the flush half: 2.53 fps. Run 271, a clean measure with no traces: 2.90 fps, p50 343 ms. - Frames unchanged against the runs without it. - ASTRO BOT (PPSA21567 01.019.000), Crash Site, `main` `086c0686c8` against the same `main` + this PR, measured by @TripyFox ([comment](https://github.com/boykopovar/AnyPS5/pull/15569#issuecomment-6619169767)). Windows 11, RTX 5090 (NVIDIA 621.01), 3840x2160, warm shader cache, three interleaved 240 s pairs with `APS5_TRACE_SUMMARY_EVERY=10 APS5_TRACE_BENCH=1`: - p50 92.7 -> 84.2 ms (-9.2 %), p99 108.5 -> 92.0 ms, presents 108.0 -> 120.3 per 10 s (+11.4 %), GPU busy 73.6 -> 72.8 ms per present. The fastest `main` run is slower than the slowest PR run. - Recorder syncs per 10 s fall from 4209 to 3157, and pending-write syncs from 1792 to 472. The storage write-back and upload volumes are unchanged. - Most of the gain comes from the label half. `APS5_NO_FLUSH_GPU_ORDERED=1` gives back most of it; `APS5_NO_REFRESH_GPU_ORDERED=1` gives back about 1 ms. - A confirmation pair on head `2da15973ce` gives the same size: p50 -6 ms in every compared interval. - On the current head, @TripyFox measured `main` `b11c7bf84f` against `b6007f6` merged onto it ([comment](https://github.com/boykopovar/AnyPS5/pull/15569#issuecomment-6633388457)). Only `libSceAgcDriver.prx` differs between the builds. The setup was 240 s runs with a warm cache, two interleaved rounds, and medians of the 10 s intervals from 40 s to 240 s, with `APS5_TRACE_SUMMARY_EVERY=10 APS5_TRACE_BENCH=1`: | Run | presents / 10 s | frame p50 ms | p99 ms | GPU busy / present ms | |---|---|---|---|---| | `main`, round 1 | 110.8 | 90.01 | 108.88 | 70.38 | | change, round 1 | 122.7 | 82.79 | 92.06 | 70.45 | | `main`, round 2 | 110.5 | 91.06 | 104.54 | 72.81 | | change, round 2 | 120.5 | 84.39 | 90.58 | 72.73 | - `tools/performance_compare.py` on the two summary lines below (interval from 100 s, round 1): frame p50 -8.3 ms (-9.1 %), p99 -22.9 ms, GPU busy -0.6 ms. The only configuration difference it lists is `window.first_present`. - Summary line, `main`: ```json {"commit":"b11c7bf84f5d","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_TRACE_BENCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 621.01","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 9800X3D 8-Core Processor","cpu_threads":16,"memory_mib":65140,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":1641,"ms":10040.788},"interval_start_s":100.904,"interval_end_s":110.945,"presents":110,"frame_ms":{"p50":90.588,"p90":100.512,"p99":114.130,"max":118.423},"gpu_busy_ms_per_present":70.925,"worker_busy_pct":{"queue worker 0x0":97.787,"queue worker 0x40":99.954,"queue worker 0x48":100.058,"queue worker 0x46":2.206},"top_phases_ms_per_frame":{"Driver.Packet":272.861,"Driver.Packet.memory_wait":159.319,"Driver.Packet.draw":55.195,"Driver.Draw":54.820,"Graphics.Draw":46.451,"Graphics.Draw.draw_and_resource_release":37.184,"Driver.Draw.shader_compile_and_link":29.343,"Shader.DrawStage":24.561},"trace_dropped":false,"trace":""} ``` - Summary line, this change: ```json {"commit":"78693efa462b","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_TRACE_BENCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 621.01","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 9800X3D 8-Core Processor","cpu_threads":16,"memory_mib":65140,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":1452,"ms":10065.337},"interval_start_s":100.957,"interval_end_s":111.022,"presents":124,"frame_ms":{"p50":82.300,"p90":86.826,"p99":91.225,"max":94.329},"gpu_busy_ms_per_present":70.315,"worker_busy_pct":{"queue worker 0x0":97.584,"queue worker 0x40":99.964,"queue worker 0x48":99.992,"queue worker 0x46":1.450},"top_phases_ms_per_frame":{"Driver.Packet":241.869,"Driver.Packet.memory_wait":142.862,"Graphics.Draw":47.769,"Driver.Packet.draw":47.312,"Driver.Draw":46.912,"Graphics.Draw.draw_and_resource_release":38.622,"Driver.Draw.shader_compile_and_link":26.900,"Driver.Packet.prepare_memory":22.820},"trace_dropped":false,"trace":""} ``` - These runs used the bench summaries, so no `.json.gz` traces are attached. - Focused tests at `b6007f69a9`: the four tests above plus `agc_driver_direct_write_completion`, `agc_driver_linear_target_direct_write_completion`, `agc_driver_fill_completion_labels`, `agc_driver_linear_target_completion_points` and `agc_driver_memory_value_fill`. | Where | Result | |---|---| | Linux, RTX 4070 Ti, driver 615.71.09 | 9 of 9 pass in each of 3 runs | | Windows 11 VM, GT 1030, driver 582.78 | at `b6007f69a9`: 8 of 9 pass in each of 3 runs, including all four new tests. The failure is `agc_driver_direct_write_completion`, which also fails on `main` `1c8c0efc8c` there in each of 3 runs (#15564, fixed by #15610) | | Khronos validation 1.4.341, re-run 11-09 with `VK_LOADER_DEBUG=layer`, base `1c8c0efc8c` vs head `b6007f69a9` | 4 of 4 and 6 of 6 pass; the loader inserted the layer for each of the 7 and 11 Vulkan devices; no `VUID-`. This replaces a 1.4.363 run whose layer load can't be confirmed: the layer directory it used was gone, and without `VK_LOADER_DEBUG` a missing layer leaves no trace in the log (#17896) | **Overlap:** #12070 also changes `FlushPending`'s writer wait: it skips waiting for an image's own stamped writes. Both skip the wait on different conditions, so they compose. The second to land rebases the wait condition. No open PR changes `StoreReadbackBeforeLabel` or the refresh compare. ### Checklist - [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) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 615.71.09, Ubuntu 26.04.1; NVIDIA GeForce GT 1030, driver 582.78, Windows 11 VM - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
XairRrR commented 2026-11-03 22:47:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T22:47:28Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The ordered flush is correct where I could check it, and the new test reaches the new path. The PR is a perf change, though, and it lacks the summary lines from main and from the change and the traces that the rules require.

What I ran

Head d3f7307afdf8752297fc8219277117a2d44e9dc5 merged into main 49021a4c907b7f493429dfe269416bbec2de96e1 with --no-ff (merged tree 13013875e03d5a12b8def62b4a51e6ebbea6e6fb). Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19).

git diff --check 49021a4c907b7f493429dfe269416bbec2de96e1...d3f7307afdf8752297fc8219277117a2d44e9dc5
python3 tools/check_conventions.py --base 49021a4c907b7f493429dfe269416bbec2de96e1
ctest --test-dir build -R '^agc_driver_label_ordered_flush$' --output-on-failure
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 \
  ctest --test-dir build -j8 --test-load 32 --output-on-failure \
  -R '^agc_driver_(label_ordered_flush|direct_write_completion|linear_target_direct_write_completion|fill_completion_labels|linear_target_completion_points|memory_value_fill)$'
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \
  ctest --test-dir build -V -R '^agc_driver_label_ordered_flush$'
# negative control and probe (see below)
git show 49021a4c907b7f493429dfe269416bbec2de96e1:core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
ninja -C build -j32 -l32 tests/agc_driver_label_ordered_flush_tests
ctest --test-dir build -R '^agc_driver_label_ordered_flush$' --output-on-failure --repeat until-fail:3
git show 13013875e03d5a12b8def62b4a51e6ebbea6e6fb:core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
git status --porcelain

Results

Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Configure / build / libs (script) passed
Selected tests (script, 2176 run) 0 new failures, 0 timeouts; the 7 known failures also fail on main (agc_driver_division, denormal-mode tests, vector_constant_factor_tininess, one unwrap_self test)
agc_driver_label_ordered_flush passes, 0.38 s
The 6 focused tests from the description, with the validation layer 5 passed, agc_driver_linear_target_direct_write_completion skipped on lavapipe
Validation, agc_driver_label_ordered_flush layer loaded (inserted, no "was not found but was requested"), 0 VUID- lines
Script validation comparison 783/784 tests with the layer loaded. New VUID-VkSamplerCreateInfo-addressMode* lines only in agc_driver_image_gather_volume, which was not in main's baseline pass. The PR does not touch sampler creation, so I don't count them against it
Skip actually taken in the new test (temporary probe in FlushPending) ordered=1 active=1 skip=1 n=1 in all 8 runs; label landed after the stored texels
Probe output (temporary fprintf before if (orderedSkip), removed afterwards)
      8 [probe] ordered=1 active=1 skip=1 n=1
      1 label ordered flush tests passed

Negative control

I restored core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp from main, rebuilt agc_driver_label_ordered_flush_tests and ran it three times: it passes on main. That is expected. On main the CPU waits for the writer, so the label order already holds. The test guards against the skip breaking the order; it doesn't fail without the change. A temporary probe in the merged build showed that the test reaches the new skip in each of its 8 runs. I then restored the merged file and rebuilt; git status --porcelain is empty.

Findings

Blocking

  • Perf evidence missing (project rule). The PR is titled perf(agc) and still carries perf numbers missing. CONTRIBUTING.md requires the aps5-summary.jsonl lines of main and of the change from the same machine and scene, the two traces, and tools/trace_digest.py output. The bot comment asks for the same. The description gives fps and p50 from a "local stack (the same change on an older base, with other GoT experiments)", which doesn't isolate this change. Fix: capture PPSA02225 on current main and on this branch the way the Performance report form describes, then paste both summary lines, attach the traces and add the digest.

Non-blocking

  • The skip doesn't check the image's device against the active recorder. core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:4690 requires Recorder::Active() != nullptr and a host import for each flushed image. The write-back records into the recorder only when recorderFor(context) matches the image's device (Texture.cpp:70-72). Otherwise it goes to a standalone CommandBatch (Texture.cpp:6783-6807), which isn't ordered behind the writer. The first range loop in StoreReadbackBeforeLabel doesn't filter by device, and the tests create several Vulkan devices. Suggest adding texture->context.device == Recorder::Active()->Device() to the all_of predicate, so a cross-device flush keeps the wait.
  • Checklist Unblocks line. The rule's form is Unblocks: PPSA01325 #3232, with the Game bring-up discussion. The line here names no discussion, and it describes a speed-up rather than a stop or a wrong result. Add the discussion number, or use none if no bring-up entry tracks this.
  • Head moved since the reviewed commit. The PR head is now f37b080 (a merge of upstream main that resolves Texture.cpp around pruneAdoptedSources()). I reviewed d3f7307 merged into main, as prepared, so that conflict resolution was not reviewed here.

Not verified

  • Hardware GPUs: only lavapipe here. The description's RTX 4070 Ti and GT 1030 runs, and the NVIDIA CI comment, were not reproduced.
  • The GoT numbers (I can't run titles) and the claim that frames are unchanged.
  • A refresh where the skip is taken over memory outside the write watch. There, the skipped write-backs' CPU-side checks (cpuLeftUnchanged, ChangedBlocks) may read guest bytes that an earlier recorded write-back is still copying into. I found no test covering this.
  • The negative control can't show that the test detects a misordering, because main is ordered by the CPU wait.

To get this to a good state

  1. Add the two summary lines (main and this change, same scene and machine), the traces and the trace_digest.py output, so the perf numbers missing label clears.
  2. Optionally restrict the skip to images on the active recorder's device, and fix the Unblocks line.
  3. Rerun the focused tests on the new head f37b080 after the merge resolution.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5760576691 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15569#pullrequestreview-5760576691). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T22:47:28Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The ordered flush is correct where I could check it, and the new test reaches the new path. The PR is a `perf` change, though, and it lacks the summary lines from `main` and from the change and the traces that the rules require. ## What I ran Head `d3f7307afdf8752297fc8219277117a2d44e9dc5` merged into `main` `49021a4c907b7f493429dfe269416bbec2de96e1` with `--no-ff` (merged tree `13013875e03d5a12b8def62b4a51e6ebbea6e6fb`). Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19). ``` git diff --check 49021a4c907b7f493429dfe269416bbec2de96e1...d3f7307afdf8752297fc8219277117a2d44e9dc5 python3 tools/check_conventions.py --base 49021a4c907b7f493429dfe269416bbec2de96e1 ctest --test-dir build -R '^agc_driver_label_ordered_flush$' --output-on-failure env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 \ ctest --test-dir build -j8 --test-load 32 --output-on-failure \ -R '^agc_driver_(label_ordered_flush|direct_write_completion|linear_target_direct_write_completion|fill_completion_labels|linear_target_completion_points|memory_value_fill)$' env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \ ctest --test-dir build -V -R '^agc_driver_label_ordered_flush$' # negative control and probe (see below) git show 49021a4c907b7f493429dfe269416bbec2de96e1:core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp ninja -C build -j32 -l32 tests/agc_driver_label_ordered_flush_tests ctest --test-dir build -R '^agc_driver_label_ordered_flush$' --output-on-failure --repeat until-fail:3 git show 13013875e03d5a12b8def62b4a51e6ebbea6e6fb:core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp git status --porcelain ``` ## Results | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Configure / build / libs (script) | passed | | Selected tests (script, 2176 run) | 0 new failures, 0 timeouts; the 7 known failures also fail on `main` (`agc_driver_division`, denormal-mode tests, `vector_constant_factor_tininess`, one `unwrap_self` test) | | `agc_driver_label_ordered_flush` | passes, 0.38 s | | The 6 focused tests from the description, with the validation layer | 5 passed, `agc_driver_linear_target_direct_write_completion` skipped on lavapipe | | Validation, `agc_driver_label_ordered_flush` | layer loaded (inserted, no "was not found but was requested"), 0 `VUID-` lines | | Script validation comparison | 783/784 tests with the layer loaded. New `VUID-VkSamplerCreateInfo-addressMode*` lines only in `agc_driver_image_gather_volume`, which was not in `main`'s baseline pass. The PR does not touch sampler creation, so I don't count them against it | | Skip actually taken in the new test (temporary probe in `FlushPending`) | `ordered=1 active=1 skip=1 n=1` in all 8 runs; label landed after the stored texels | <details><summary>Probe output (temporary fprintf before <code>if (orderedSkip)</code>, removed afterwards)</summary> ``` 8 [probe] ordered=1 active=1 skip=1 n=1 1 label ordered flush tests passed ``` </details> ## Negative control I restored `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` from `main`, rebuilt `agc_driver_label_ordered_flush_tests` and ran it three times: **it passes on `main`**. That is expected. On `main` the CPU waits for the writer, so the label order already holds. The test guards against the skip breaking the order; it doesn't fail without the change. A temporary probe in the merged build showed that the test reaches the new skip in each of its 8 runs. I then restored the merged file and rebuilt; `git status --porcelain` is empty. ## Findings ### Blocking - **Perf evidence missing (project rule).** The PR is titled `perf(agc)` and still carries `perf numbers missing`. CONTRIBUTING.md requires the `aps5-summary.jsonl` lines of `main` and of the change from the same machine and scene, the two traces, and `tools/trace_digest.py` output. The bot comment asks for the same. The description gives fps and p50 from a "local stack (the same change on an older base, with other GoT experiments)", which doesn't isolate this change. Fix: capture PPSA02225 on current `main` and on this branch the way the Performance report form describes, then paste both summary lines, attach the traces and add the digest. ### Non-blocking - **The skip doesn't check the image's device against the active recorder.** `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:4690` requires `Recorder::Active() != nullptr` and a host import for each flushed image. The write-back records into the recorder only when `recorderFor(context)` matches the image's device (`Texture.cpp:70-72`). Otherwise it goes to a standalone `CommandBatch` (`Texture.cpp:6783-6807`), which isn't ordered behind the writer. The first range loop in `StoreReadbackBeforeLabel` doesn't filter by device, and the tests create several Vulkan devices. Suggest adding `texture->context.device == Recorder::Active()->Device()` to the `all_of` predicate, so a cross-device flush keeps the wait. - **Checklist `Unblocks` line.** The rule's form is `Unblocks: PPSA01325 #3232`, with the Game bring-up discussion. The line here names no discussion, and it describes a speed-up rather than a stop or a wrong result. Add the discussion number, or use `none` if no bring-up entry tracks this. - **Head moved since the reviewed commit.** The PR head is now `f37b080` (a merge of upstream `main` that resolves `Texture.cpp` around `pruneAdoptedSources()`). I reviewed `d3f7307` merged into `main`, as prepared, so that conflict resolution was not reviewed here. ## Not verified - Hardware GPUs: only lavapipe here. The description's RTX 4070 Ti and GT 1030 runs, and the NVIDIA CI comment, were not reproduced. - The GoT numbers (I can't run titles) and the claim that frames are unchanged. - A refresh where the skip is taken over memory outside the write watch. There, the skipped write-backs' CPU-side checks (`cpuLeftUnchanged`, `ChangedBlocks`) may read guest bytes that an earlier recorded write-back is still copying into. I found no test covering this. - The negative control can't show that the test detects a misordering, because `main` is ordered by the CPU wait. ## To get this to a good state 1. Add the two summary lines (`main` and this change, same scene and machine), the traces and the `trace_digest.py` output, so the `perf numbers missing` label clears. 2. Optionally restrict the skip to images on the active recorder's device, and fix the `Unblocks` line. 3. Rerun the focused tests on the new head `f37b080` after the merge resolution. <!-- anyps5-bots job=3664 head=d3f7307afdf8752297fc8219277117a2d44e9dc5 -->
XairRrR commented 2026-11-03 23:07:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T23:07:21Z.

Review: CHANGES_REQUESTED


Re-checked — changes still requested

Since my last review, the author merged upstream main into the branch (f37b080). That merge resolves the Texture.cpp conflict around pruneAdoptedSources() correctly, and the tests pass. The perf evidence is still missing. The newest head, 2da1597 (a device check on the ordered skip), was not part of the tree prepared for this review.

What changed since my last review

  • f37b080: a merge of upstream main. In StorageTexture::refresh, the ordered-flush scope wraps FlushPending, and pruneAdoptedSources() follows the scope. That is the same position as on main, where it directly follows FlushPending (core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:2339). The four earlier commits are unchanged (delta.patch).
  • 2da1597 ("take the ordered flush only for images on the active recorder's device") is listed in pr.md as the current head. It was not in the prepared tree, and its object is not in the repository here, so I could not review it.
  • No author reply to my review. The description is unchanged in the parts that matter: there are still no summary lines and no traces.

What I ran

Head f37b080fed2a31fe64cf1ecd3e88778a3ba6593f merged into main 1c8c0efc8c41314402e6966da5bef6ea3d639d10 with --no-ff (merged tree 16285379dde5714fadf0c8bb93a6248ad1222d13). Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19).

git diff --check 1c8c0efc8c41314402e6966da5bef6ea3d639d10...f37b080fed2a31fe64cf1ecd3e88778a3ba6593f
python3 tools/check_conventions.py --base 1c8c0efc8c41314402e6966da5bef6ea3d639d10
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \
  ctest --test-dir build -V -R '^agc_driver_label_ordered_flush$'
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 \
  ctest --test-dir build -j8 --test-load 32 --output-on-failure \
  -R '^agc_driver_(label_ordered_flush|direct_write_completion|linear_target_direct_write_completion|fill_completion_labels|linear_target_completion_points|memory_value_fill)$'
git show 1c8c0efc8c41314402e6966da5bef6ea3d639d10:core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
ninja -C build -j32 -l32 tests/agc_driver_label_ordered_flush_tests
ctest --test-dir build -R '^agc_driver_label_ordered_flush$' --output-on-failure --repeat until-fail:3
git show 16285379dde5714fadf0c8bb93a6248ad1222d13:core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
ninja -C build -j32 -l32 tests/agc_driver_label_ordered_flush_tests
ctest --test-dir build -R '^agc_driver_label_ordered_flush$'
git status --porcelain
Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Configure / build / libs (script) passed
Selected tests (script, 2177 run) 0 new failures, 0 timeouts. The 7 known failures also fail on main. agc_driver_alpha_to_coverage_sample_mask_export passed on a rerun
agc_driver_label_ordered_flush with validation passes. The layer was inserted, with no "was not found but was requested" message and 0 VUID- lines
The 6 focused tests from the description, with validation 5 passed, and agc_driver_linear_target_direct_write_completion was skipped on lavapipe
Script validation comparison 784 of 785 tests loaded the layer. New VUID-VkSamplerCreateInfo-addressMode* lines appear only in agc_driver_image_gather_volume, which main's baseline did not run. The PR doesn't touch sampler creation, so I don't count them against it
Negative control with Texture.cpp restored from main, the test passes 3 times out of 3, as expected (see last review). After restoring the merged file it passes again, and git status --porcelain is empty

Previous findings

  • Blocking: perf evidence missing. Still open. The description still has no aps5-summary.jsonl lines from main and from the change, no traces and no trace_digest.py output, and the PR still carries perf numbers missing.
  • Non-blocking: the skip doesn't check the image's device against the active recorder. Still open in the reviewed tree: the all_of predicate at core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:4696 tests only HostImportFor. The author pushed 2da1597, whose message says it adds this check. I couldn't see that commit, so I can't confirm it.
  • Non-blocking: checklist Unblocks line. Still open. It names no Game bring-up discussion, and it describes a speed-up rather than a stop or a wrong result.
  • Non-blocking: head moved, merge resolution not reviewed. Resolved for f37b080. The resolution keeps pruneAdoptedSources() right after the flush, as on main, and the focused tests pass on the merged tree.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • Commit 2da1597: it was not available in the prepared tree.
  • Hardware GPUs: only lavapipe here.
  • The GoT numbers, and the claim that frames are unchanged.
  • Whether the test catches a misordering: on main the CPU wait already provides the order, so the negative control passes there.

To get this to a good state

  1. Capture PPSA02225 on current main and on this branch, on the same machine and scene, following the Performance report form. Paste both summary lines, attach the traces and add the trace_digest.py output.
  2. Add the Game bring-up discussion to the Unblocks line, or write none.
  3. I'll check the device-check commit 2da1597 in the next pass.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5760767737 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15569#pullrequestreview-5760767737). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T23:07:21Z. **Review:** CHANGES_REQUESTED --- # Re-checked — changes still requested Since my last review, the author merged upstream `main` into the branch (`f37b080`). That merge resolves the `Texture.cpp` conflict around `pruneAdoptedSources()` correctly, and the tests pass. The `perf` evidence is still missing. The newest head, `2da1597` (a device check on the ordered skip), was not part of the tree prepared for this review. ## What changed since my last review - `f37b080`: a merge of upstream `main`. In `StorageTexture::refresh`, the ordered-flush scope wraps `FlushPending`, and `pruneAdoptedSources()` follows the scope. That is the same position as on `main`, where it directly follows `FlushPending` (`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:2339`). The four earlier commits are unchanged (delta.patch). - `2da1597` ("take the ordered flush only for images on the active recorder's device") is listed in pr.md as the current head. It was not in the prepared tree, and its object is not in the repository here, so I could not review it. - No author reply to my review. The description is unchanged in the parts that matter: there are still no summary lines and no traces. ## What I ran Head `f37b080fed2a31fe64cf1ecd3e88778a3ba6593f` merged into `main` `1c8c0efc8c41314402e6966da5bef6ea3d639d10` with `--no-ff` (merged tree `16285379dde5714fadf0c8bb93a6248ad1222d13`). Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19). ``` git diff --check 1c8c0efc8c41314402e6966da5bef6ea3d639d10...f37b080fed2a31fe64cf1ecd3e88778a3ba6593f python3 tools/check_conventions.py --base 1c8c0efc8c41314402e6966da5bef6ea3d639d10 env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \ ctest --test-dir build -V -R '^agc_driver_label_ordered_flush$' env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 \ ctest --test-dir build -j8 --test-load 32 --output-on-failure \ -R '^agc_driver_(label_ordered_flush|direct_write_completion|linear_target_direct_write_completion|fill_completion_labels|linear_target_completion_points|memory_value_fill)$' git show 1c8c0efc8c41314402e6966da5bef6ea3d639d10:core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp ninja -C build -j32 -l32 tests/agc_driver_label_ordered_flush_tests ctest --test-dir build -R '^agc_driver_label_ordered_flush$' --output-on-failure --repeat until-fail:3 git show 16285379dde5714fadf0c8bb93a6248ad1222d13:core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp ninja -C build -j32 -l32 tests/agc_driver_label_ordered_flush_tests ctest --test-dir build -R '^agc_driver_label_ordered_flush$' git status --porcelain ``` | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Configure / build / libs (script) | passed | | Selected tests (script, 2177 run) | 0 new failures, 0 timeouts. The 7 known failures also fail on `main`. `agc_driver_alpha_to_coverage_sample_mask_export` passed on a rerun | | `agc_driver_label_ordered_flush` with validation | passes. The layer was inserted, with no "was not found but was requested" message and 0 `VUID-` lines | | The 6 focused tests from the description, with validation | 5 passed, and `agc_driver_linear_target_direct_write_completion` was skipped on lavapipe | | Script validation comparison | 784 of 785 tests loaded the layer. New `VUID-VkSamplerCreateInfo-addressMode*` lines appear only in `agc_driver_image_gather_volume`, which `main`'s baseline did not run. The PR doesn't touch sampler creation, so I don't count them against it | | Negative control | with `Texture.cpp` restored from `main`, the test passes 3 times out of 3, as expected (see last review). After restoring the merged file it passes again, and `git status --porcelain` is empty | ## Previous findings - **Blocking: perf evidence missing.** Still open. The description still has no `aps5-summary.jsonl` lines from `main` and from the change, no traces and no `trace_digest.py` output, and the PR still carries `perf numbers missing`. - **Non-blocking: the skip doesn't check the image's device against the active recorder.** Still open in the reviewed tree: the `all_of` predicate at `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:4696` tests only `HostImportFor`. The author pushed `2da1597`, whose message says it adds this check. I couldn't see that commit, so I can't confirm it. - **Non-blocking: checklist `Unblocks` line.** Still open. It names no Game bring-up discussion, and it describes a speed-up rather than a stop or a wrong result. - **Non-blocking: head moved, merge resolution not reviewed.** Resolved for `f37b080`. The resolution keeps `pruneAdoptedSources()` right after the flush, as on `main`, and the focused tests pass on the merged tree. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - Commit `2da1597`: it was not available in the prepared tree. - Hardware GPUs: only lavapipe here. - The GoT numbers, and the claim that frames are unchanged. - Whether the test catches a misordering: on `main` the CPU wait already provides the order, so the negative control passes there. ## To get this to a good state 1. Capture PPSA02225 on current `main` and on this branch, on the same machine and scene, following the Performance report form. Paste both summary lines, attach the traces and add the `trace_digest.py` output. 2. Add the Game bring-up discussion to the `Unblocks` line, or write `none`. 3. I'll check the device-check commit `2da1597` in the next pass. <!-- anyps5-bots job=3687 head=f37b080fed2a31fe64cf1ecd3e88778a3ba6593f -->
XairRrR commented 2026-11-03 23:18:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T23:18:56Z.

Review: DISMISSED


Re-checked — changes still requested

2da1597 adds the device check on the ordered skip, and Unblocks now reads none. Both earlier non-blocking findings are resolved. The perf evidence is still missing.

What changed since my last review

  • 2da1597: FlushPending keeps the active recorder in orderedRecorder and adds texture->context.device == orderedRecorder->Device() to the skip's all_of predicate (core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:4696-4697). Recorder::Device() returns the recorder's context.device (core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp:457). The four earlier commits and the merge are unchanged (delta.patch).
  • Description: the Unblocks line is now none.
  • Author comment: the captures are queued on an RTX 4070 Ti. The base is main 1c8c0efc8c plus #9742, and the plan is three base runs alternating with three runs of the change. The summary lines, traces and digest are not in the description yet.

What I ran

Head 2da15973ce0a3fa5e4d9e574d6ee1df640544dad merged into main 1c8c0efc8c41314402e6966da5bef6ea3d639d10 with --no-ff (merged tree 8299001b2297bfe2faec19be0c646a7b41e71798). Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19).

git diff --check 1c8c0efc8c41314402e6966da5bef6ea3d639d10...2da15973ce0a3fa5e4d9e574d6ee1df640544dad
python3 tools/check_conventions.py --base 1c8c0efc8c41314402e6966da5bef6ea3d639d10
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \
  ctest --test-dir build -j8 --test-load 32 -V \
  -R '^agc_driver_(label_ordered_flush|direct_write_completion|linear_target_direct_write_completion|fill_completion_labels|linear_target_completion_points|memory_value_fill)$'
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \
  ctest --test-dir build -V -R '^agc_driver_label_ordered_flush$'
env APS5_TRACE_FLUSH=1 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -V -R '^agc_driver_label_ordered_flush$'
env APS5_NO_FLUSH_GPU_ORDERED=1 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -R '^agc_driver_label_ordered_flush$' --output-on-failure
git status --porcelain
Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Configure, build and libs (script) passed
Selected tests (script, 2177 run) 0 new failures and 0 timeouts. The 7 known failures also fail on main. agc_driver_alpha_to_coverage_sample_mask_export passed on a rerun
The 6 focused tests, with validation 5 passed. agc_driver_linear_target_direct_write_completion was skipped on lavapipe. 0 VUID- lines, and no "was not found but was requested" message
agc_driver_label_ordered_flush, with validation passed. The loader added VK_LAYER_KHRONOS_validation, with 0 VUID- lines
APS5_TRACE_FLUSH=1 each run logs a [flush] image …+0x10000 for readback before label, so the test reaches the ordered path
APS5_NO_FLUSH_GPU_ORDERED=1 passed (the CPU-wait path)
Script validation comparison 784 of 785 tests loaded the layer. New VUID-VkSamplerCreateInfo-addressMode* lines appear only in agc_driver_image_gather_volume. main's baseline did not run that test, and the PR doesn't touch sampler creation, so I don't count them against it (same as last time)
git status --porcelain empty

The test is unchanged since my last review, so I did not repeat the negative control. That control passed with main's Texture.cpp, as expected, because there the CPU wait already provides the order.

Previous findings

  • Blocking: perf evidence missing. Still open. The description has no aps5-summary.jsonl lines from a base and from the change, no traces and no trace_digest.py output, and the PR still carries perf numbers missing. The author says the captures are in progress.
  • Non-blocking: the skip doesn't check the image's device against the active recorder. Resolved by 2da1597. The predicate now requires texture->context.device == orderedRecorder->Device(). An image of another device falls through to the old wait loop, and the refresh's orderedSkipped is only set when FlushPending actually skipped.
  • Non-blocking: checklist Unblocks line. Resolved. It now reads none.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • Hardware GPUs: only lavapipe here. The author reports that 2da1597 passes on an RTX 4070 Ti; the GT 1030 run was still in progress.
  • The GoT frame-rate numbers, and the claim that frames are unchanged.
  • Whether the test catches a misordering: on main the CPU wait already provides the order, so the test passes there too.

To get this to a good state

  1. Add the PPSA02225 summary lines for the base and the change to the description, from the same machine and scene, as the Performance report form asks. Attach the traces and add the trace_digest.py output. The base the author describes (main + #9742, with only this PR's 3 files differing) is fine, as long as the two lines carry different commits.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5760871098 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15569#pullrequestreview-5760871098). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T23:18:56Z. **Review:** DISMISSED --- # Re-checked — changes still requested `2da1597` adds the device check on the ordered skip, and `Unblocks` now reads `none`. Both earlier non-blocking findings are resolved. The `perf` evidence is still missing. ## What changed since my last review - `2da1597`: `FlushPending` keeps the active recorder in `orderedRecorder` and adds `texture->context.device == orderedRecorder->Device()` to the skip's `all_of` predicate (`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:4696-4697`). `Recorder::Device()` returns the recorder's `context.device` (`core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp:457`). The four earlier commits and the merge are unchanged (delta.patch). - Description: the `Unblocks` line is now `none`. - Author comment: the captures are queued on an RTX 4070 Ti. The base is `main` `1c8c0efc8c` plus #9742, and the plan is three base runs alternating with three runs of the change. The summary lines, traces and digest are not in the description yet. ## What I ran Head `2da15973ce0a3fa5e4d9e574d6ee1df640544dad` merged into `main` `1c8c0efc8c41314402e6966da5bef6ea3d639d10` with `--no-ff` (merged tree `8299001b2297bfe2faec19be0c646a7b41e71798`). Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19). ``` git diff --check 1c8c0efc8c41314402e6966da5bef6ea3d639d10...2da15973ce0a3fa5e4d9e574d6ee1df640544dad python3 tools/check_conventions.py --base 1c8c0efc8c41314402e6966da5bef6ea3d639d10 env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \ ctest --test-dir build -j8 --test-load 32 -V \ -R '^agc_driver_(label_ordered_flush|direct_write_completion|linear_target_direct_write_completion|fill_completion_labels|linear_target_completion_points|memory_value_fill)$' env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \ ctest --test-dir build -V -R '^agc_driver_label_ordered_flush$' env APS5_TRACE_FLUSH=1 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -V -R '^agc_driver_label_ordered_flush$' env APS5_NO_FLUSH_GPU_ORDERED=1 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -R '^agc_driver_label_ordered_flush$' --output-on-failure git status --porcelain ``` | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Configure, build and libs (script) | passed | | Selected tests (script, 2177 run) | 0 new failures and 0 timeouts. The 7 known failures also fail on `main`. `agc_driver_alpha_to_coverage_sample_mask_export` passed on a rerun | | The 6 focused tests, with validation | 5 passed. `agc_driver_linear_target_direct_write_completion` was skipped on lavapipe. 0 `VUID-` lines, and no "was not found but was requested" message | | `agc_driver_label_ordered_flush`, with validation | passed. The loader added `VK_LAYER_KHRONOS_validation`, with 0 `VUID-` lines | | `APS5_TRACE_FLUSH=1` | each run logs a `[flush] image …+0x10000 for readback before label`, so the test reaches the ordered path | | `APS5_NO_FLUSH_GPU_ORDERED=1` | passed (the CPU-wait path) | | Script validation comparison | 784 of 785 tests loaded the layer. New `VUID-VkSamplerCreateInfo-addressMode*` lines appear only in `agc_driver_image_gather_volume`. `main`'s baseline did not run that test, and the PR doesn't touch sampler creation, so I don't count them against it (same as last time) | | `git status --porcelain` | empty | The test is unchanged since my last review, so I did not repeat the negative control. That control passed with `main`'s `Texture.cpp`, as expected, because there the CPU wait already provides the order. ## Previous findings - **Blocking: perf evidence missing.** Still open. The description has no `aps5-summary.jsonl` lines from a base and from the change, no traces and no `trace_digest.py` output, and the PR still carries `perf numbers missing`. The author says the captures are in progress. - **Non-blocking: the skip doesn't check the image's device against the active recorder.** Resolved by `2da1597`. The predicate now requires `texture->context.device == orderedRecorder->Device()`. An image of another device falls through to the old wait loop, and the refresh's `orderedSkipped` is only set when `FlushPending` actually skipped. - **Non-blocking: checklist `Unblocks` line.** Resolved. It now reads `none`. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - Hardware GPUs: only lavapipe here. The author reports that `2da1597` passes on an RTX 4070 Ti; the GT 1030 run was still in progress. - The GoT frame-rate numbers, and the claim that frames are unchanged. - Whether the test catches a misordering: on `main` the CPU wait already provides the order, so the test passes there too. ## To get this to a good state 1. Add the PPSA02225 summary lines for the base and the change to the description, from the same machine and scene, as the Performance report form asks. Attach the traces and add the `trace_digest.py` output. The base the author describes (`main` + #9742, with only this PR's 3 files differing) is fine, as long as the two lines carry different commits. <!-- anyps5-bots job=3707 head=2da15973ce0a3fa5e4d9e574d6ee1df640544dad -->
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!15569
No description provided.