fix(agc): mirror the whole contiguous run of releasable allocations a joined heap belongs to #15297

Open
Prophet069 wants to merge 1 commit from upstream-pr/15297 into main
Prophet069 commented 2026-11-02 23:01:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Prophet069 on 2026-11-02T23:01:29Z.


What

A joined heap mirror covered only the allocations the draw's range crossed, so every draw that reached one allocation further built a new multi-GiB mirror of an overlapping run while the previous one stayed alive.

The joined range is now the whole run of contiguous releasable allocations, and joined runs that a longer run of the same allocations replaces are released, so their mirrors are swept instead of holding a second copy.

Tested

NVIDIA GeForce RTX 3080 Laptop GPU, driver 616.64, Windows 10 Pro 22H2 (19045.6466).
Focused tests on main (9090972b7e) and on this branch with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1, ctest -V -R "heap_mirror|^agc_driver_graphics$|^agc_driver_key_miss$|^agc_driver_bda_device$|^agc_driver_recorder$|native_multisample_depth|depth_storage|^agc_host_import_retire$|^agc_host_import_sparse$":

  • main: 17 of 20 selected tests passed (agc_host_import_sparse skips on this machine; the three agc_driver_depth_storage_* tests were not built in this run); validation layer loaded in both logs; VUID- errors: none.
  • this branch: 17 of 20 selected tests passed (agc_host_import_sparse skips on this machine; the three agc_driver_depth_storage_* tests were not built in this run), the same as main; VUID- errors: none.
  • Death Stranding 2 (PPSA02015), local integration branch with the GPU heap path pull requests: world load built overlapping ~6 GiB heap mirrors at four different bases and held two of them at once.

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: PPSA02015 #5424
  • GPUs tested: NVIDIA GeForce RTX 3080 Laptop GPU, driver 616.64, Windows 10 Pro 22H2 (19045.6466)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5128814297 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15297). Originally posted by [Prophet069](https://github.com/Prophet069) on 2026-11-02T23:01:29Z. --- ### What A joined heap mirror covered only the allocations the draw's range crossed, so every draw that reached one allocation further built a new multi-GiB mirror of an overlapping run while the previous one stayed alive. The joined range is now the whole run of contiguous releasable allocations, and joined runs that a longer run of the same allocations replaces are released, so their mirrors are swept instead of holding a second copy. ### Tested NVIDIA GeForce RTX 3080 Laptop GPU, driver 616.64, Windows 10 Pro 22H2 (19045.6466). Focused tests on `main` (9090972b7e) and on this branch with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1`, `ctest -V -R "heap_mirror|^agc_driver_graphics$|^agc_driver_key_miss$|^agc_driver_bda_device$|^agc_driver_recorder$|native_multisample_depth|depth_storage|^agc_host_import_retire$|^agc_host_import_sparse$"`: - `main`: 17 of 20 selected tests passed (agc_host_import_sparse skips on this machine; the three agc_driver_depth_storage_* tests were not built in this run); validation layer loaded in both logs; `VUID-` errors: none. - this branch: 17 of 20 selected tests passed (agc_host_import_sparse skips on this machine; the three agc_driver_depth_storage_* tests were not built in this run), the same as main; `VUID-` errors: none. - Death Stranding 2 (PPSA02015), local integration branch with the GPU heap path pull requests: world load built overlapping ~6 GiB heap mirrors at four different bases and held two of them at once. ### 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) 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: PPSA02015 #5424 - [x] GPUs tested: NVIDIA GeForce RTX 3080 Laptop GPU, driver 616.64, Windows 10 Pro 22H2 (19045.6466) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
XairRrR commented 2026-11-03 07:53:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T07:53:54Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The fix does what it says for overlapping draws, but it also makes the joined mirror's size depend on the whole run rather than on what the draw needs, so a heap whose run is over the heap mirror budget is now copied instead of mirrored.

What I ran

Head b8fd3637f5a0f787e2e6c178295386054c9cb300, main d1ae628bc2f62459cce1e9872ba5632c938c71f2, merged tree 5ee43a854dabdc5399ed7847cee248b6771f605a (Release, GCC 14.2.0, Ninja; Debian 13 VM, lavapipe / Mesa 26.1.6, no GPU).

git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...b8fd3637f5a0f787e2e6c178295386054c9cb300
python3 tools/check_conventions.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2
# temporary probe added to tests/BdaResources.cpp (called from RunSparseHeapMirrorUnwatchTests), not committed:
ninja -C build -j32 -l32 agc_driver_graphics_tests
ctest --test-dir build -R "^agc_sparse_heap_mirror_unwatch$" -V            # with the PR's GuestBufferMemory.cpp, then with main's
build/tests/agc_driver_graphics_tests --sparse-heap-mirror-unwatch
# restored the merged tree, rebuilt
ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "heap_mirror|^agc_driver_graphics$|^agc_driver_bda_device$"
git status --porcelain

Results

Check Result
git diff --check clean
check_conventions.py all checks passed
Build (script) ok
Selected tests (script, 2131 run) no new failures and no timeouts; the 7 known failures also fail on main
Khronos validation (script, 767 tests, layer loaded in 766, none missing) no new VUID- vs main
Heap mirror tests on the merged tree (12) all passed. agc_driver_graphics took 35.0 s while running in parallel with the others. The PR changes no tests, so the time is not the PR's.
Probe, overlapping draws, default budget PR: 1 mirror (3 MiB) that both binds reuse. main: 2 overlapping mirrors held together (4 MiB)
Probe, 2.5 MiB budget PR: both binds refused ("past the budget"), copied instead. main: both mirrored
Probe output

The probe uses three adjacent 1 MiB releasable allocations, with only the first 64 KiB page of each committed (a sparse heap). Bind 1 is [a0, a0+2 MiB) and bind 2 is [a1, a1+2 MiB). The counters are MirrorCounters().heapMirrors and heapBytes, read before, after bind 1 and after bind 2.

PR, default budget:

probe view adjustment 0 range 2097152 first byte 64 byte at +half 65
probe view adjustment 0 range 2097152 first byte 65 byte at +half 66
probe heapMirrors 0 1 1 ... heapBytes 0 3145728 3145728 ... sparseBinds 0 1 2

main, default budget:

probe heapMirrors 0 1 2 ... heapBytes 0 2097152 4194304 ... sparseBinds 0 1 2

main, SetHeapMirrorBudget(2.5 MiB):

probe view adjustment 0 range 2097152 ...
probe view adjustment 0 range 2097152 ...
probe heapMirrors 0 1 1 ... heapBytes 0 2097152 2097152 ... sparseBinds 2 3 4

PR, SetHeapMirrorBudget(2.5 MiB):

[gpu] AGC graphics: heap mirror of 0x7fa9a3c10000+0x300000: past the budget; heap mirrors hold 0 MiB of 2 MiB (APS5_HEAP_MIRROR_MIB); copying the sparse heap instead
[gpu] AGC graphics: heap mirror of 0x7fa9a3c10000+0x300000: past the budget; ...; copying the sparse heap instead
probe view adjustment 0 range 1114112 ...
probe view adjustment 0 range 1114112 ...

The probe's own cleanup sweep then threw under the tiny budget while building per-allocation mirrors. That is an artifact of the probe, not of this PR's path.

Negative control

The PR adds no test, so there is nothing to revert against. Instead, the temporary probe above serves as one: with main's GuestBufferMemory.cpp it shows the duplicate mirror the description reports (2 mirrors, 4 MiB for a 3 MiB run), and with the PR's file the duplicate is gone. This settles the question BunnyFl left open: none of the existing focused tests builds a joined heap across a growing or shifted run, so their passing proves nothing about the fix. After the probe I restored the merged files and rebuilt; git status --porcelain is empty.

Findings

Blocking

The joined mirror now covers the whole releasable run, so a run over the heap mirror budget is never mirrored, even when the part the draw needs fits.
wholeReleasableRun extends the run over every adjacent releasable allocation, with no limit (lines 5154-5155). joinedHeapRange then hands that range to acquireMirror. A mirror larger than heapMirrorBudget() (24 GiB by default, or APS5_HEAP_MIRROR_MIB) throws "past the budget". bindSparseMirror then falls back to copying.

On main, only the crossed allocations were mirrored, so such a heap was mirrored. The probe shows the change directly: with a 2.5 MiB budget, main mirrors both 2 MiB binds, and the PR copies both.

The cost also grows when nothing fails. A draw that crosses two small allocations inside a long run of releasable ones now builds, holds and refreshes a mirror of the entire run. The rule "implement the general behaviour" applies here: the size of the mirror should not depend on how many unrelated allocations happen to sit next to the heap.

Suggested fix: keep the whole run only when it fits, for example extend only while run.bytes stays within heapMirrorBudget() (or a fraction of it), and otherwise fall back to the crossed run as on main. Add a test for both cases (see below).

Non-blocking

No regression test for the fix. The overlapping-mirror case is easy to pin with the existing mock setup: three adjacent releasable allocations, binds at [a0, a2) and [a1, a3), then MirrorCounters().heapMirrors must have grown by exactly 1 and heapBytes must equal the run size. With main's file this fails (2 mirrors and 4 MiB in my probe), so it works as the negative control. A second case with SetHeapMirrorBudget below the run size would cover the blocking finding. It finishes in milliseconds.

I reviewed the superseded-entry loop in joinedHeapRange and found no problem. It erases overlapping entries under the joined-heaps lock, drops them after the lock is released, and bumps Mirrors().version so sweepMirrors cannot return early. This agrees with BunnyFl's reading.

Not verified

  • The Death Stranding 2 (PPSA02015) observation; I launch no titles.
  • Behaviour on hardware GPUs. The NVIDIA and AMD runs in the discussion found no new failures or VUIDs; I ran lavapipe and mock-Vulkan tests only.
  • Whether any title has releasable runs larger than the default 24 GiB budget. The finding was shown with a reduced test budget.

To get this to a good state

  1. Limit the whole-run extension so that it falls back to the crossed run when the whole run would exceed the heap mirror budget.
  2. Add a mock-Vulkan test for overlapping binds (one mirror remains) and for the over-budget case (the crossed run is still mirrored), and show that the first test fails with main's GuestBufferMemory.cpp.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5748754266 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15297#pullrequestreview-5748754266). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T07:53:54Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The fix does what it says for overlapping draws, but it also makes the joined mirror's size depend on the whole run rather than on what the draw needs, so a heap whose run is over the heap mirror budget is now copied instead of mirrored. ## What I ran Head `b8fd3637f5a0f787e2e6c178295386054c9cb300`, `main` `d1ae628bc2f62459cce1e9872ba5632c938c71f2`, merged tree `5ee43a854dabdc5399ed7847cee248b6771f605a` (Release, GCC 14.2.0, Ninja; Debian 13 VM, lavapipe / Mesa 26.1.6, no GPU). ``` git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...b8fd3637f5a0f787e2e6c178295386054c9cb300 python3 tools/check_conventions.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2 # temporary probe added to tests/BdaResources.cpp (called from RunSparseHeapMirrorUnwatchTests), not committed: ninja -C build -j32 -l32 agc_driver_graphics_tests ctest --test-dir build -R "^agc_sparse_heap_mirror_unwatch$" -V # with the PR's GuestBufferMemory.cpp, then with main's build/tests/agc_driver_graphics_tests --sparse-heap-mirror-unwatch # restored the merged tree, rebuilt ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "heap_mirror|^agc_driver_graphics$|^agc_driver_bda_device$" git status --porcelain ``` ## Results | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | all checks passed | | Build (script) | ok | | Selected tests (script, 2131 run) | no new failures and no timeouts; the 7 known failures also fail on `main` | | Khronos validation (script, 767 tests, layer loaded in 766, none missing) | no new `VUID-` vs `main` | | Heap mirror tests on the merged tree (12) | all passed. `agc_driver_graphics` took 35.0 s while running in parallel with the others. The PR changes no tests, so the time is not the PR's. | | Probe, overlapping draws, default budget | PR: 1 mirror (3 MiB) that both binds reuse. `main`: 2 overlapping mirrors held together (4 MiB) | | Probe, 2.5 MiB budget | PR: both binds refused ("past the budget"), copied instead. `main`: both mirrored | <details><summary>Probe output</summary> The probe uses three adjacent 1 MiB releasable allocations, with only the first 64 KiB page of each committed (a sparse heap). Bind 1 is `[a0, a0+2 MiB)` and bind 2 is `[a1, a1+2 MiB)`. The counters are `MirrorCounters().heapMirrors` and `heapBytes`, read before, after bind 1 and after bind 2. PR, default budget: ``` probe view adjustment 0 range 2097152 first byte 64 byte at +half 65 probe view adjustment 0 range 2097152 first byte 65 byte at +half 66 probe heapMirrors 0 1 1 ... heapBytes 0 3145728 3145728 ... sparseBinds 0 1 2 ``` main, default budget: ``` probe heapMirrors 0 1 2 ... heapBytes 0 2097152 4194304 ... sparseBinds 0 1 2 ``` main, `SetHeapMirrorBudget(2.5 MiB)`: ``` probe view adjustment 0 range 2097152 ... probe view adjustment 0 range 2097152 ... probe heapMirrors 0 1 1 ... heapBytes 0 2097152 2097152 ... sparseBinds 2 3 4 ``` PR, `SetHeapMirrorBudget(2.5 MiB)`: ``` [gpu] AGC graphics: heap mirror of 0x7fa9a3c10000+0x300000: past the budget; heap mirrors hold 0 MiB of 2 MiB (APS5_HEAP_MIRROR_MIB); copying the sparse heap instead [gpu] AGC graphics: heap mirror of 0x7fa9a3c10000+0x300000: past the budget; ...; copying the sparse heap instead probe view adjustment 0 range 1114112 ... probe view adjustment 0 range 1114112 ... ``` The probe's own cleanup sweep then threw under the tiny budget while building per-allocation mirrors. That is an artifact of the probe, not of this PR's path. </details> ## Negative control The PR adds no test, so there is nothing to revert against. Instead, the temporary probe above serves as one: with `main`'s `GuestBufferMemory.cpp` it shows the duplicate mirror the description reports (2 mirrors, 4 MiB for a 3 MiB run), and with the PR's file the duplicate is gone. This settles the question BunnyFl left open: none of the existing focused tests builds a joined heap across a growing or shifted run, so their passing proves nothing about the fix. After the probe I restored the merged files and rebuilt; `git status --porcelain` is empty. ## Findings ### Blocking **The joined mirror now covers the whole releasable run, so a run over the heap mirror budget is never mirrored, even when the part the draw needs fits.** [`wholeReleasableRun`](https://github.com/boykopovar/AnyPS5/blob/b8fd3637f5a0f787e2e6c178295386054c9cb300/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp#L5149-L5160) extends the run over every adjacent releasable allocation, with no limit (lines 5154-5155). `joinedHeapRange` then hands that range to `acquireMirror`. A mirror larger than [`heapMirrorBudget()`](https://github.com/boykopovar/AnyPS5/blob/b8fd3637f5a0f787e2e6c178295386054c9cb300/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp#L2705-L2712) (24 GiB by default, or `APS5_HEAP_MIRROR_MIB`) throws "past the budget". [`bindSparseMirror`](https://github.com/boykopovar/AnyPS5/blob/b8fd3637f5a0f787e2e6c178295386054c9cb300/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp#L5213-L5218) then falls back to copying. On `main`, only the crossed allocations were mirrored, so such a heap was mirrored. The probe shows the change directly: with a 2.5 MiB budget, `main` mirrors both 2 MiB binds, and the PR copies both. The cost also grows when nothing fails. A draw that crosses two small allocations inside a long run of releasable ones now builds, holds and refreshes a mirror of the entire run. The rule "implement the general behaviour" applies here: the size of the mirror should not depend on how many unrelated allocations happen to sit next to the heap. Suggested fix: keep the whole run only when it fits, for example extend only while `run.bytes` stays within `heapMirrorBudget()` (or a fraction of it), and otherwise fall back to the crossed run as on `main`. Add a test for both cases (see below). ### Non-blocking **No regression test for the fix.** The overlapping-mirror case is easy to pin with the existing mock setup: three adjacent releasable allocations, binds at `[a0, a2)` and `[a1, a3)`, then `MirrorCounters().heapMirrors` must have grown by exactly 1 and `heapBytes` must equal the run size. With `main`'s file this fails (2 mirrors and 4 MiB in my probe), so it works as the negative control. A second case with `SetHeapMirrorBudget` below the run size would cover the blocking finding. It finishes in milliseconds. I reviewed the superseded-entry loop in `joinedHeapRange` and found no problem. It erases overlapping entries under the joined-heaps lock, drops them after the lock is released, and bumps `Mirrors().version` so `sweepMirrors` cannot return early. This agrees with BunnyFl's reading. ## Not verified - The Death Stranding 2 (PPSA02015) observation; I launch no titles. - Behaviour on hardware GPUs. The NVIDIA and AMD runs in the discussion found no new failures or VUIDs; I ran lavapipe and mock-Vulkan tests only. - Whether any title has releasable runs larger than the default 24 GiB budget. The finding was shown with a reduced test budget. ## To get this to a good state 1. Limit the whole-run extension so that it falls back to the crossed run when the whole run would exceed the heap mirror budget. 2. Add a mock-Vulkan test for overlapping binds (one mirror remains) and for the over-budget case (the crossed run is still mirrored), and show that the first test fails with `main`'s `GuestBufferMemory.cpp`. <!-- anyps5-bots job=2708 head=b8fd3637f5a0f787e2e6c178295386054c9cb300 -->
gabichuuuuu commented 2026-11-08 15:48:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-08T15:48:42Z.

Review: COMMENTED


Ran b8fd3637f5 merged on main 302864d48c on Windows 11 x64 (WinLibs GCC 15.2), on an NVIDIA laptop GPU (Turing, driver 621) and an Intel iGPU (driver 101.70xx), with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (Khronos validation layer 1.4.368), ctest -R '^agc_driver_resident_heap_mirror' -V:

main change, 2 runs each
NVIDIA 1/1 1/1 twice
Intel 1/1 1/1 twice
  • The PR adds no test, so this only shows the existing heap mirror test still passes.
  • The layer was inserted in every test that opens a device. No log has was not found but was requested by env var VK_INSTANCE_LAYERS, and no log on either side has a VUID-. To be sure validation messages reach these logs, the same layer with best practices on printed 28 BestPractices- warnings into an agc_driver_recorder log on each GPU.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5818523657 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15297#pullrequestreview-5818523657). Originally posted by [gabichuuuuu](https://github.com/gabichuuuuu) on 2026-11-08T15:48:42Z. **Review:** COMMENTED --- Ran `b8fd3637f5` merged on `main` 302864d48c on Windows 11 x64 (WinLibs GCC 15.2), on an NVIDIA laptop GPU (Turing, driver 621) and an Intel iGPU (driver 101.70xx), with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (Khronos validation layer 1.4.368), `ctest -R '^agc_driver_resident_heap_mirror' -V`: | | `main` | change, 2 runs each | |---|---|---| | NVIDIA | 1/1 | 1/1 twice | | Intel | 1/1 | 1/1 twice | - The PR adds no test, so this only shows the existing heap mirror test still passes. - The layer was inserted in every test that opens a device. No log has `was not found but was requested by env var VK_INSTANCE_LAYERS`, and no log on either side has a `VUID-`. To be sure validation messages reach these logs, the same layer with best practices on printed 28 `BestPractices-` warnings into an `agc_driver_recorder` log on each GPU. AI-assisted: yes.
MarcZX10 commented 2026-11-16 19:46:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T19:46:14Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the reviewed implementation and its existing focused tests support merging.

What I ran

Reviewed head b8fd3637f5a0f787e2e6c178295386054c9cb300 using repo_read.py to read the prepared description, commit list, manifest, diff, changed source, and targeted call sites. No commands or tests were run. The author reports focused tests on main and this branch; those results were not independently verified.

Results

Check Result Note
Changed source review passed One changed file reviewed
Focused tests not run Author reports matching results on main and branch
Negative control not run Not performed in this review

Findings

Blocking

None.

Non-blocking

None.

Not verified

The manifest lists only core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp under reviewed changes, and its full text was available and read. The prepared diff contains no test-file changes; existing targeted tests were inspected in core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp, including coverage for joined heaps across adjacent ranges, partial import retention, and release after full import. No build, test run, or runtime behavior was independently verified. The author reports 17 of 20 selected tests passed on both main and this branch, with the same skips and no validation-layer VUID- errors.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5926407701 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15297#pullrequestreview-5926407701). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-16T19:46:14Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the reviewed implementation and its existing focused tests support merging. ## What I ran Reviewed head `b8fd3637f5a0f787e2e6c178295386054c9cb300` using `repo_read.py` to read the prepared description, commit list, manifest, diff, changed source, and targeted call sites. No commands or tests were run. The author reports focused tests on main and this branch; those results were not independently verified. ## Results | Check | Result | Note | |---|---|---| | Changed source review | passed | One changed file reviewed | | Focused tests | not run | Author reports matching results on main and branch | | Negative control | not run | Not performed in this review | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The manifest lists only `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` under reviewed changes, and its full text was available and read. The prepared diff contains no test-file changes; existing targeted tests were inspected in `core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp`, including coverage for joined heaps across adjacent ranges, partial import retention, and release after full import. No build, test run, or runtime behavior was independently verified. The author reports 17 of 20 selected tests passed on both main and this branch, with the same skips and no validation-layer `VUID-` errors. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 22:45:09 +00:00 (Migrated from github.com)

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

Review: COMMENTED


The trial merge onto c1601e56d5 conflicts in GuestBufferMemory.cpp. Please cover extension of a joined run at the same base as well as a new run that starts earlier. The new sweep-generation bump is driven by the superseded list, and that list skips the entry at run.base. A same-base replacement takes a different retirement path. A test that checks live mirror bytes after both changes would verify that the old run can be released without discarding in-flight work.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6179945273 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15297#pullrequestreview-6179945273). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T22:45:09Z. **Review:** COMMENTED --- The trial merge onto `c1601e56d5` conflicts in `GuestBufferMemory.cpp`. Please cover extension of a joined run at the same base as well as a new run that starts earlier. The new sweep-generation bump is driven by the `superseded` list, and that list skips the entry at `run.base`. A same-base replacement takes a different retirement path. A test that checks live mirror bytes after both changes would verify that the old run can be released without discarding in-flight work. 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/15297:upstream-pr/15297'
git switch 'upstream-pr/15297'

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