fix(agc): honor release memory L2 write-back requests #18956

Open
mjnhbg3 wants to merge 1 commit from upstream-pr/18956 into main
mjnhbg3 commented 2026-11-12 16:05:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mjnhbg3 on 2026-11-12T16:05:36Z.


What

A RELEASE_MEM that explicitly requests GL2 write-back can make its completion label visible while a larger tiled storage image still has unpublished results. A later readback can then overwrite CPU stores made after that completion, including stores whose values match the image's earlier contents.

The production change is in shared AGC code, with no host CPU architecture-specific path.

Honor the GCR GL2_WB bit before the release's label, interrupt or cache-only completion. Publish pending image, depth and unit-shadow results, exclude these releases from label batching, and stop dispatch look-ahead at the boundary. Reject unsupported scope/discard/sequence fields, event/index combinations, queued-read ownership and concurrent image publication instead of reporting completion. The limits are recorded in the AGC driver debt file.

The supported event and cache fields follow AMD PAL commit c5e800072a32f68b6ccc4422936d96167c6e0728: GFX10 GCR layout, release construction and event restrictions. This is source-based validation, not a console measurement. Ordinary releases without GL2_WB, including ordinal2 0x514, keep their existing path.

The synthetic regression builds on JJenkx's published larger-surface fixture and controls. Closed #6960 is relevant prior work; this change honors an explicit cache request rather than flushing every image at every label. The test checks publication at completion, subsequent changed and identical CPU stores, untouched GPU-written bytes and allocation guards. It contains no game shaders or dump data.

Rebased onto pinned main 4e866156c12d1eeea1002e02b737cd0f71db6908. Main's merged #20127 GCN seven/eight-dword size gate and both seven-dword checks precede the new write-back checks; its GCN system-counter allowance remains afterward. The seven-dword control mask excludes bit 21, so those packets cannot enter the new GL2 write-back route. The debt edit is now an add-only fragment in docs/dev/debt/changes/gpu-completion-reuse-rebase.md.

The optional review points were checked against the pinned source: bit 20 is GL2 invalidation, already covered by the acceptance test, and is intentionally outside the unsupported-scope mask. CMake registers the default execution case before loading the timeout fragment. The unregistered legacy mode explicitly reports a diagnostic with no asserted cache-visibility contract and is excluded from acceptance counts. The PAL line anchors above and in the debt fragment were corrected.

Tested

Fresh matched runs on 2026-11-16, from an isolated checkout: Windows 11 ARM64, native Qualcomm Adreno X1-85 (vendor 0x5143, device 0x36334330), Qualcomm Vulkan driver 0.863.0 / Windows display driver 31.0.152.1, Vulkan API 1.3.295, WinLibs GCC 15.2 Release. Both arms configured and built the same 13 focused targets with compiler caching disabled; generated revision metadata recorded the exact clean source head. The test-local PRXs matched the active build outputs, and all 23 recorded EXE/runtime artifacts stayed unchanged during each run.

Production main is pinned to 4e866156c12d1eeea1002e02b737cd0f71db6908; the candidate is 590c15c57d8cf98498fda6a5b547cf06d71cdcfd. The main-side negative control was local fixture commit 8b4d0cb9bd7271d9794f7e0c803ffc4b1272941b: main plus only these identical test files copied from the candidate, with every production file unchanged:

  • core/libs/prx/libSceAgcDriver/tests/execution/StorageCompletionReuse.cpp
  • core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_storage_completion_reuse_tests.cmake

All 49 case names, commands and per-case environment settings matched. The same child-only settings were used in both arms: ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer, SDK VK_LAYER_PATH, and ANYPS5_GPU=Qualcomm(R) Adreno(TM) X1-85 GPU. The normal installed loader was used with no ICD override or staged loader. Actual project output proves every one of the 44 hardware cases selected the native Qualcomm GPU, loaded qcvkarm64xum.dll, and inserted the validation layer. The five CPU contract cases do not initialize Vulkan. The layer API was 1.4.363, newer than pinned Vulkan-Headers 1.4.335.

Arm Existing 25: pass / fail / skip New 24: pass / fail / skip Total: pass / fail / skip VUID / missing layer Actual layer insertions
main + identical fixture 17 / 1 / 7 5 / 19 / 0 22 / 20 / 7 0 / 0 76
candidate 17 / 1 / 7 24 / 0 / 0 41 / 1 / 7 0 / 0 76

The 19 failing negative controls become passes; all 25 existing case verdicts remain unchanged. The five already-passing new controls are the four small-size variants and consumer_ahead. Both CTest processes honestly exited 8: the pre-existing agc_driver_label_ordered_flush still fails with no label store took the GPU-ordered flush over the host import, and seven unsupported-path cases still skip. This is not an all-green suite or complete coverage of those skipped paths. No new failure, skip or VUID- error was added; neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS.

Exact focused command and unchanged skips

With the child settings above, both arms ran:

ctest --test-dir b -R '^(agc_driver_(storage_completion_reuse.*|pm4|linear_readback_label.*|label_ordered_flush.*|finisher_label_order.*|unimported_label_order.*|copied_writer_label_order.*|pipelined_predicated_label_order.*|storage_idle_store_completes|depth_plane_cpu_store_after_idle_flush|unregistered_label_on_gpu)|agc_recorder_kept_bytes|agc_storage_idle_writeback_race|agc_storage_kept_unit_settle|agc_completion_label_wait|agc_idle_publish_wait)$' -V --parallel 1 --no-tests=error --output-junit <arm-specific-result.xml>

The same seven cases skipped in both runs:

  • agc_driver_copied_writer_label_order
  • agc_driver_unimported_label_order
  • agc_driver_unregistered_label_on_gpu
  • agc_driver_copied_writer_label_order_drain
  • agc_idle_publish_wait
  • agc_driver_unimported_label_order_draw_pipeline
  • agc_driver_unimported_label_order_plan_verify

Full verbose logs, raw JUnit, source/build receipts, per-case native-driver/layer evidence and artifact hashes were retained outside the repository. Main raw log SHA-256: 1dcec4185ef57ae66c0a8b75034469080ccac7a63b9d353d61fe29efb15a8371. Candidate raw log SHA-256: f3a74ceb957709ef35c8f7ffc584f2df70df0a2c8b4408bad3a50fb859e94dd3. The original baseline collector receipt is preserved alongside a separately derived classification receipt; only the source-backed classification of three CPU-routed predicated WRITE_DATA tests changed, with no rerun or alteration of results/settings.

python3 tools/check_conventions.py --base origin/main passes on the final candidate. Its own debt fragment folds successfully as exactly one added Functional entry. Whole-repository debt_fold.py --check fails identically on both main and candidate because the unrelated docs-nkwebkit-drop-readded-count-lines.md:5 fragment cannot find 5933 of the 8703; no unrelated debt fix is included.

Overlap was refreshed against the exact final main/candidate pins: 1,776 open PRs scanned, 77 peers selected, 34 with no findings, 43 uncompared including this PR's own old head. The checker exit remains 2. All 42 independent uncompared peers received manual shared-hunk review; their heads, original before/after blobs, patches and selected paths are unchanged in the refreshed packet. No independent duplicate explicit GL2 write-back implementation or current prerequisite was identified. The expected self-comparison against old head 6adb3d70822228f9ef783573353058f6cfd341d9 is separate from independent overlap. The C-export name scanner does not establish overlap for these C++ helpers; manual source review supplies that check.

Future integration needs care with #5925's dispatch scans, #10442's early labels, #15136's deferred serial capture, #18914's PM4 refactor, #17338's pending mutex, #13920's publication path, #9508's indexing, #13251's alias exemptions and #13863's lane behavior. These are not open dependencies. Earlier neighbors #9893, #16011, #17999 and #20127 are merged into the pinned main. This is a review of pinned shared changes, not a claim that all peer PRs build or run together. The complete evidence packet independently verified 448 objects / 219 file records; manifest SHA-256 bd675bccd94f55e586efdd26dae56deea781fca7e4408fa1e7025aa0c3bcccfb.

Independent source review found no material blocker and confirmed the nine original code/test deltas and author metadata were preserved through the rebase. No PS5 comparison, title run or performance claim is made. Earlier AMD/NVIDIA reports in comments apply to old head 6adb3d7, not this refreshed matrix.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: Qualcomm Adreno X1-85, Qualcomm proprietary driver 0.863.0 (Windows display driver 31.0.152.1), Windows 11 ARM64; x64 WinLibs test executables under Windows emulation
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5280808844 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18956). Originally posted by [mjnhbg3](https://github.com/mjnhbg3) on 2026-11-12T16:05:36Z. --- ### What A RELEASE_MEM that explicitly requests GL2 write-back can make its completion label visible while a larger tiled storage image still has unpublished results. A later readback can then overwrite CPU stores made after that completion, including stores whose values match the image's earlier contents. The production change is in shared AGC code, with no host CPU architecture-specific path. Honor the GCR GL2_WB bit before the release's label, interrupt or cache-only completion. Publish pending image, depth and unit-shadow results, exclude these releases from label batching, and stop dispatch look-ahead at the boundary. Reject unsupported scope/discard/sequence fields, event/index combinations, queued-read ownership and concurrent image publication instead of reporting completion. The limits are recorded in the AGC driver debt file. The supported event and cache fields follow AMD PAL commit `c5e800072a32f68b6ccc4422936d96167c6e0728`: [GFX10 GCR layout](https://github.com/GPUOpen-Drivers/pal/blob/c5e800072a32f68b6ccc4422936d96167c6e0728/src/core/hw/gfxip/gfx9/gfx9CmdUtil.cpp#L253-L273), [release construction and event restrictions](https://github.com/GPUOpen-Drivers/pal/blob/c5e800072a32f68b6ccc4422936d96167c6e0728/src/core/hw/gfxip/gfx9/gfx9CmdUtil.cpp#L3428-L3530). This is source-based validation, not a console measurement. Ordinary releases without GL2_WB, including ordinal2 `0x514`, keep their existing path. The synthetic regression builds on [JJenkx's published larger-surface fixture and controls](https://github.com/boykopovar/AnyPS5/pull/6960#issuecomment-6586883025). Closed [#6960](https://github.com/boykopovar/AnyPS5/pull/6960) is relevant prior work; this change honors an explicit cache request rather than flushing every image at every label. The test checks publication at completion, subsequent changed and identical CPU stores, untouched GPU-written bytes and allocation guards. It contains no game shaders or dump data. Rebased onto pinned main `4e866156c12d1eeea1002e02b737cd0f71db6908`. Main's merged #20127 GCN seven/eight-dword size gate and both seven-dword checks precede the new write-back checks; its GCN system-counter allowance remains afterward. The seven-dword control mask excludes bit 21, so those packets cannot enter the new GL2 write-back route. The debt edit is now an add-only fragment in `docs/dev/debt/changes/gpu-completion-reuse-rebase.md`. The optional review points were checked against the pinned source: bit 20 is GL2 invalidation, already covered by the acceptance test, and is intentionally outside the unsupported-scope mask. CMake registers the default execution case before loading the timeout fragment. The unregistered legacy mode explicitly reports a diagnostic with no asserted cache-visibility contract and is excluded from acceptance counts. The PAL line anchors above and in the debt fragment were corrected. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Fresh matched runs on 2026-11-16, from an isolated checkout: Windows 11 ARM64, native Qualcomm Adreno X1-85 (vendor `0x5143`, device `0x36334330`), Qualcomm Vulkan driver `0.863.0` / Windows display driver `31.0.152.1`, Vulkan API `1.3.295`, WinLibs GCC 15.2 Release. Both arms configured and built the same 13 focused targets with compiler caching disabled; generated revision metadata recorded the exact clean source head. The test-local PRXs matched the active build outputs, and all 23 recorded EXE/runtime artifacts stayed unchanged during each run. Production main is pinned to `4e866156c12d1eeea1002e02b737cd0f71db6908`; the candidate is `590c15c57d8cf98498fda6a5b547cf06d71cdcfd`. The main-side negative control was local fixture commit `8b4d0cb9bd7271d9794f7e0c803ffc4b1272941b`: main plus only these identical test files copied from the candidate, with every production file unchanged: - `core/libs/prx/libSceAgcDriver/tests/execution/StorageCompletionReuse.cpp` - `core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_storage_completion_reuse_tests.cmake` All 49 case names, commands and per-case environment settings matched. The same child-only settings were used in both arms: `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `VK_LOADER_DEBUG=layer`, SDK `VK_LAYER_PATH`, and `ANYPS5_GPU=Qualcomm(R) Adreno(TM) X1-85 GPU`. The normal installed loader was used with no ICD override or staged loader. Actual project output proves every one of the 44 hardware cases selected the native Qualcomm GPU, loaded `qcvkarm64xum.dll`, and inserted the validation layer. The five CPU contract cases do not initialize Vulkan. The layer API was **1.4.363**, newer than pinned Vulkan-Headers 1.4.335. | Arm | Existing 25: pass / fail / skip | New 24: pass / fail / skip | Total: pass / fail / skip | VUID / missing layer | Actual layer insertions | |---|---|---|---|---|---| | main + identical fixture | 17 / 1 / 7 | 5 / 19 / 0 | 22 / 20 / 7 | 0 / 0 | 76 | | candidate | 17 / 1 / 7 | 24 / 0 / 0 | 41 / 1 / 7 | 0 / 0 | 76 | The 19 failing negative controls become passes; all 25 existing case verdicts remain unchanged. The five already-passing new controls are the four small-size variants and `consumer_ahead`. Both CTest processes honestly exited **8**: the pre-existing `agc_driver_label_ordered_flush` still fails with `no label store took the GPU-ordered flush over the host import`, and seven unsupported-path cases still skip. This is not an all-green suite or complete coverage of those skipped paths. No new failure, skip or `VUID-` error was added; neither log contains `was not found but was requested by env var VK_INSTANCE_LAYERS`. <details> <summary>Exact focused command and unchanged skips</summary> With the child settings above, both arms ran: ```text ctest --test-dir b -R '^(agc_driver_(storage_completion_reuse.*|pm4|linear_readback_label.*|label_ordered_flush.*|finisher_label_order.*|unimported_label_order.*|copied_writer_label_order.*|pipelined_predicated_label_order.*|storage_idle_store_completes|depth_plane_cpu_store_after_idle_flush|unregistered_label_on_gpu)|agc_recorder_kept_bytes|agc_storage_idle_writeback_race|agc_storage_kept_unit_settle|agc_completion_label_wait|agc_idle_publish_wait)$' -V --parallel 1 --no-tests=error --output-junit <arm-specific-result.xml> ``` The same seven cases skipped in both runs: - `agc_driver_copied_writer_label_order` - `agc_driver_unimported_label_order` - `agc_driver_unregistered_label_on_gpu` - `agc_driver_copied_writer_label_order_drain` - `agc_idle_publish_wait` - `agc_driver_unimported_label_order_draw_pipeline` - `agc_driver_unimported_label_order_plan_verify` Full verbose logs, raw JUnit, source/build receipts, per-case native-driver/layer evidence and artifact hashes were retained outside the repository. Main raw log SHA-256: `1dcec4185ef57ae66c0a8b75034469080ccac7a63b9d353d61fe29efb15a8371`. Candidate raw log SHA-256: `f3a74ceb957709ef35c8f7ffc584f2df70df0a2c8b4408bad3a50fb859e94dd3`. The original baseline collector receipt is preserved alongside a separately derived classification receipt; only the source-backed classification of three CPU-routed predicated WRITE_DATA tests changed, with no rerun or alteration of results/settings. </details> `python3 tools/check_conventions.py --base origin/main` passes on the final candidate. Its own debt fragment folds successfully as exactly one added Functional entry. Whole-repository `debt_fold.py --check` fails identically on both main and candidate because the unrelated `docs-nkwebkit-drop-readded-count-lines.md:5` fragment cannot find `5933 of the 8703`; no unrelated debt fix is included. Overlap was refreshed against the exact final main/candidate pins: **1,776** open PRs scanned, **77** peers selected, **34** with no findings, **43** uncompared including this PR's own old head. The checker exit remains **2**. All **42 independent uncompared peers** received manual shared-hunk review; their heads, original before/after blobs, patches and selected paths are unchanged in the refreshed packet. No independent duplicate explicit GL2 write-back implementation or current prerequisite was identified. The expected self-comparison against old head `6adb3d70822228f9ef783573353058f6cfd341d9` is separate from independent overlap. The C-export name scanner does not establish overlap for these C++ helpers; manual source review supplies that check. Future integration needs care with #5925's dispatch scans, #10442's early labels, #15136's deferred serial capture, #18914's PM4 refactor, #17338's pending mutex, #13920's publication path, #9508's indexing, #13251's alias exemptions and #13863's lane behavior. These are not open dependencies. Earlier neighbors #9893, #16011, #17999 and #20127 are merged into the pinned main. This is a review of pinned shared changes, not a claim that all peer PRs build or run together. The complete evidence packet independently verified 448 objects / 219 file records; manifest SHA-256 `bd675bccd94f55e586efdd26dae56deea781fca7e4408fa1e7025aa0c3bcccfb`. Independent source review found no material blocker and confirmed the nine original code/test deltas and author metadata were preserved through the rebase. No PS5 comparison, title run or performance claim is made. Earlier AMD/NVIDIA reports in comments apply to old head `6adb3d7`, not this refreshed matrix. ### 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) and the licence notice of code adapted from upstream (see AGENTS.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 <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: Qualcomm Adreno X1-85, Qualcomm proprietary driver 0.863.0 (Windows display driver 31.0.152.1), Windows 11 ARM64; x64 WinLibs test executables under Windows emulation <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
MarcZX10 commented 2026-11-12 16:09:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T16:09:47Z.

Review: COMMENTED


Reviewed the GL2 write-back release change — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

  • Exact head: 6adb3d70822228f9ef783573353058f6cfd341d9, base main. This matches the reviewed head in the run folder.
  • Read the full diff (all 10 changed files). For modified files the diff gives only the changed hunks, not the full text.
  • Read repository context at the head with the reader (repo_read.py): the FlushPending and StoreBeforeRelease neighbourhood, the RELEASE_MEM validation, the packet call site, the Require helper, and the test wiring in the AGC driver CMakeLists.txt.
  • No build and no test run in this pass. The CTest results in the description are the author's report and were not reproduced.

Results

Check Result Note
Diff read, 10 files passed Hunks only for modified files
Context reads passed Listed under Not verified
Reason string "release" passed Only the new caller uses it
Test wiring passed Test cmake fragments and test sources are globbed
No comments added passed Checked in the diff
Build not run No build in this pass
CTest not run Author-reported only
Convention and overlap checks not run Author-reported only

Findings

Blocking

None verified.

Non-blocking

  • core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp:532 masks 0x00cf0000 for scope, discard and sequence bits. Bit 0x00100000 is not in the mask, and no test in tests/Pm4.cpp checks it either way. If that bit is a scope field, a release that sets it is accepted without the rejection the description promises.
  • core/libs/prx/libSceAgcDriver/tests/execution/StorageCompletionReuse.cpp:358 returns 0 when releaseFlags is 0x514, even if failures is nonzero. The legacy mode is accepted by main but not registered in the cmake fragment, so a registered run cannot reach it. A manual run with that mode reports failures and still exits 0.
  • core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_storage_completion_reuse_tests.cmake:4 sets a timeout on agc_driver_storage_completion_reuse. That test name is never registered in the file, so the property applies to nothing.

Not verified

  • Build and tests. Nothing was built or run here. The author's CTest output, including the nonzero exit from agc_driver_label_ordered_flush and the seven skips, was not reproduced.
  • Coverage of the reads. Full text was not read for Graphics/src/Texture.cpp, Graphics/include/Texture.hpp, Execution/include/Pm4.hpp, Execution/src/Driver/Dispatch/DispatchAhead.cpp, tests/Pm4.cpp or docs/dev/debt/libSceAgcDriver.md. Those files were checked at their changed hunks and the context shown above. Only Execution/src/Driver/Packets/PacketMemory.cpp was read in part from the run folder. No verdict is given over the unread parts of these files.
  • Error propagation. The new Require calls (Texture.cpp:4958, 4982, 5472, 5476, and the Pm4.cpp:532 to 537 checks) throw from preparePacketMemory, which is called at PacketExecution.cpp:400. Whether an outer handler catches the throw was not read.
  • Bit 20. Whether 0x00100000 is a scope field in the cited PAL layout was not checked.
  • Timestamp route. The test compares a GPU-written timestamp to ClockStamp, which is the steady clock divided by 10. Whether the driver's DATA_SEL 3 uses that clock was not read.
  • Performance. StoreBeforeRelease passes the full address range (Texture.cpp:5483), so every explicit write-back publishes all pending images. The cost was not measured, and the description makes no performance claim.
  • Links. The PAL permalinks and the overlap audit in the description were not opened or checked.
  • Hardware. The GPU runs are Adreno only, with synthetic workloads. Nothing here covers console behaviour.

To get this to a good state

Nothing is required. The non-blocking points above are optional.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5877839262 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18956#pullrequestreview-5877839262). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-12T16:09:47Z. **Review:** COMMENTED --- # Reviewed the GL2 write-back release change — no blocking findings Nothing blocks this; the points below are optional. ## What I ran - Exact head: `6adb3d70822228f9ef783573353058f6cfd341d9`, base `main`. This matches the reviewed head in the run folder. - Read the full diff (all 10 changed files). For modified files the diff gives only the changed hunks, not the full text. - Read repository context at the head with the reader (`repo_read.py`): the `FlushPending` and `StoreBeforeRelease` neighbourhood, the `RELEASE_MEM` validation, the packet call site, the `Require` helper, and the test wiring in the AGC driver `CMakeLists.txt`. - No build and no test run in this pass. The CTest results in the description are the author's report and were not reproduced. ## Results | Check | Result | Note | |---|---|---| | Diff read, 10 files | passed | Hunks only for modified files | | Context reads | passed | Listed under Not verified | | Reason string `"release"` | passed | Only the new caller uses it | | Test wiring | passed | Test cmake fragments and test sources are globbed | | No comments added | passed | Checked in the diff | | Build | not run | No build in this pass | | CTest | not run | Author-reported only | | Convention and overlap checks | not run | Author-reported only | ## Findings **Blocking** None verified. **Non-blocking** - `core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp:532` masks `0x00cf0000` for scope, discard and sequence bits. Bit `0x00100000` is not in the mask, and no test in `tests/Pm4.cpp` checks it either way. If that bit is a scope field, a release that sets it is accepted without the rejection the description promises. - `core/libs/prx/libSceAgcDriver/tests/execution/StorageCompletionReuse.cpp:358` returns 0 when `releaseFlags` is `0x514`, even if `failures` is nonzero. The `legacy` mode is accepted by `main` but not registered in the cmake fragment, so a registered run cannot reach it. A manual run with that mode reports failures and still exits 0. - `core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_storage_completion_reuse_tests.cmake:4` sets a timeout on `agc_driver_storage_completion_reuse`. That test name is never registered in the file, so the property applies to nothing. ## Not verified - **Build and tests.** Nothing was built or run here. The author's CTest output, including the nonzero exit from `agc_driver_label_ordered_flush` and the seven skips, was not reproduced. - **Coverage of the reads.** Full text was not read for `Graphics/src/Texture.cpp`, `Graphics/include/Texture.hpp`, `Execution/include/Pm4.hpp`, `Execution/src/Driver/Dispatch/DispatchAhead.cpp`, `tests/Pm4.cpp` or `docs/dev/debt/libSceAgcDriver.md`. Those files were checked at their changed hunks and the context shown above. Only `Execution/src/Driver/Packets/PacketMemory.cpp` was read in part from the run folder. No verdict is given over the unread parts of these files. - **Error propagation.** The new `Require` calls (`Texture.cpp:4958`, `4982`, `5472`, `5476`, and the `Pm4.cpp:532` to `537` checks) throw from `preparePacketMemory`, which is called at `PacketExecution.cpp:400`. Whether an outer handler catches the throw was not read. - **Bit 20.** Whether `0x00100000` is a scope field in the cited PAL layout was not checked. - **Timestamp route.** The test compares a GPU-written timestamp to `ClockStamp`, which is the steady clock divided by 10. Whether the driver's `DATA_SEL 3` uses that clock was not read. - **Performance.** `StoreBeforeRelease` passes the full address range (`Texture.cpp:5483`), so every explicit write-back publishes all pending images. The cost was not measured, and the description makes no performance claim. - **Links.** The PAL permalinks and the overlap audit in the description were not opened or checked. - **Hardware.** The GPU runs are Adreno only, with synthetic workloads. Nothing here covers console behaviour. ## To get this to a good state Nothing is required. The non-blocking points above are optional.
MarcZX10 commented 2026-11-21 06:12:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T06:12:54Z.

Review: APPROVED


Reviewed — looks good

Nothing in the inspected changes blocks merging; the reported focused runs support the release write-back behavior.

What I ran

Reviewed head 590c15c57d8cf98498fda6a5b547cf06d71cdcfd. I did not run commands or tests; the test and convention results below are author-reported. No merged-preview check was run.

Inspected all nine changed files listed as reviewed in the manifest, including the texture implementation through the pinned reader. repo_read.py was not available as a shell command in this review interface; repository reads used the provided pinned reader tools.

Results

Check Result Note
Source review passed Release handling and tests inspected
Focused test runs not run Author reports 19 controls fixed; existing failure and skips remain
Convention check not run Author reports pass
Whole-repository debt check not run Author reports same unrelated failure on both arms

Findings

Blocking

None.

Non-blocking

None.

Not verified

I did not independently run the reported Windows ARM64 test matrix, the convention checker, or debt checks. The author reports 7 skipped cases and one pre-existing failing test, and explicitly makes no PS5 comparison, title-run, or performance claim. These results were not independently confirmed.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6003412859 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18956#pullrequestreview-6003412859). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T06:12:54Z. **Review:** APPROVED --- # Reviewed — looks good Nothing in the inspected changes blocks merging; the reported focused runs support the release write-back behavior. ## What I ran Reviewed head `590c15c57d8cf98498fda6a5b547cf06d71cdcfd`. I did not run commands or tests; the test and convention results below are author-reported. No merged-preview check was run. Inspected all nine changed files listed as `reviewed` in the manifest, including the texture implementation through the pinned reader. `repo_read.py` was not available as a shell command in this review interface; repository reads used the provided pinned reader tools. ## Results | Check | Result | Note | |---|---|---| | Source review | passed | Release handling and tests inspected | | Focused test runs | not run | Author reports 19 controls fixed; existing failure and skips remain | | Convention check | not run | Author reports pass | | Whole-repository debt check | not run | Author reports same unrelated failure on both arms | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified I did not independently run the reported Windows ARM64 test matrix, the convention checker, or debt checks. The author reports 7 skipped cases and one pre-existing failing test, and explicitly makes no PS5 comparison, title-run, or performance claim. These results were not independently confirmed. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 22:17:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:17:18Z.

Review: COMMENTED


The trial merge onto a1b75b0947 was clean. I checked the order from packet validation through publication to label or interrupt completion. Please retain a write-back case with pending work when testing a release with zero data, alongside the existing parser checks. Parser acceptance cannot show that a cache-only release actually publishes before later packets execute. Paired PM4 and Vulkan storage-publication controls are pending.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6179574861 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18956#pullrequestreview-6179574861). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T22:17:18Z. **Review:** COMMENTED --- The trial merge onto `a1b75b0947` was clean. I checked the order from packet validation through publication to label or interrupt completion. Please retain a write-back case with pending work when testing a release with zero data, alongside the existing parser checks. Parser acceptance cannot show that a cache-only release actually publishes before later packets execute. Paired PM4 and Vulkan storage-publication controls are pending. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/18956:upstream-pr/18956'
git switch 'upstream-pr/18956'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/18956'
git switch 'upstream-pr/18956'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/18956'
git switch 'upstream-pr/18956'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/18956'
git switch 'main'
git merge --squash 'upstream-pr/18956'
git switch 'main'
git merge --ff-only 'upstream-pr/18956'
git switch 'main'
git merge 'upstream-pr/18956'
git push origin 'main'
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!18956
No description provided.