fix(agc): retire a depth surface once a surface of another extent takes its planes #15404

Merged
JJenkx merged 1 commit from upstream-pr/15404 into main 2026-11-15 19:20:31 +00:00
JJenkx commented 2026-11-03 05:39:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-11-03T05:39:00Z.


What

A depth surface is matched by its address, extent, format, samples and stencil address. A title with dynamic resolution binds the same depth memory at a slightly different extent from frame to frame, so each new extent creates a new surface. takePlane then hands the address's depth (and stencil) plane to the new surface. It copies the old surface's plane only when the extents are equal, so after a resize nothing is copied, and the old surface is left active, owning no plane, and never retired. releaseRetired frees only retired surfaces, so every resize leaks one depth image.

Now takePlanes remembers the surfaces that owned the address before. A single-sample surface that no longer owns any depth or stencil plane is retired with retireStoringStale. That stores its GPU results the guest has not received yet, skipping units the CPU has written since, so the guest memory holds what the console's would. releaseRetired then frees it at the next creation, unless a sampled view still holds it. Multisample surfaces are unchanged (#15300 covers their release).

Seen in Contra: Operation Galuga (PPSA15368) on main 128b5c49ba. With APS5_TRACE_MEMORY_BUDGET, the device-local heap reached 19,676 MiB of an 8,176 MiB budget, 18,771 MiB of it vkAllocateMemory depth target. A local log of depth-surface creation (not part of this PR) showed 751 single-sample D32 surfaces at only 23 addresses, 177 of them at each of three addresses, with extents such as 3840x2160, 3132x1762, 2944x1656 and 2926x1646; 4 were released.

Tested

tests/DepthSurfaceReuse.cpp adds TestDisplacedSurfaceRelease: three depth surfaces of different extents at one address, then a surface at another address (which runs releaseRetired). The two displaced surfaces must have freed their images and the owner must keep its image. On main f6232fcfda with only this test, agc_driver_graphics fails with "a depth surface whose address a surface of another extent took over must free its image"; with this change agc_driver_graphics passes (VK_LAYER_KHRONOS_validation, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1; no VUID- lines).

Measured in the title on the same base (main f6232fcfda), with the two arms run alternately (details in https://github.com/boykopovar/AnyPS5/pull/15404#issuecomment-6598654709). In full-length runs that reached the same briefing cutscene, peak vkAllocateMemory depth target memory was 6,403 and 6,481 MiB with this change, against 16,645 and 22,899 MiB on main. Device-local usage still exceeds the 8 GiB budget, at 10.6 to 10.8 GiB instead of 17.2 to 23.1 GiB. Runs of both builds can stop at about 100 s from a separate heap corruption in this title, which also occurs on main.

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: none
  • GPUs tested: AMD Radeon RX 6650 XT (RADV NAVI23), Mesa 26.2.6, Arch Linux
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5132460337 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15404). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-11-03T05:39:00Z. --- ### What A depth surface is matched by its address, extent, format, samples and stencil address. A title with dynamic resolution binds the same depth memory at a slightly different extent from frame to frame, so each new extent creates a new surface. `takePlane` then hands the address's depth (and stencil) plane to the new surface. It copies the old surface's plane only when the extents are equal, so after a resize nothing is copied, and the old surface is left active, owning no plane, and never retired. `releaseRetired` frees only retired surfaces, so every resize leaks one depth image. Now `takePlanes` remembers the surfaces that owned the address before. A single-sample surface that no longer owns any depth or stencil plane is retired with `retireStoringStale`. That stores its GPU results the guest has not received yet, skipping units the CPU has written since, so the guest memory holds what the console's would. `releaseRetired` then frees it at the next creation, unless a sampled view still holds it. Multisample surfaces are unchanged (#15300 covers their release). Seen in Contra: Operation Galuga (PPSA15368) on `main` `128b5c49ba`. With `APS5_TRACE_MEMORY_BUDGET`, the device-local heap reached 19,676 MiB of an 8,176 MiB budget, 18,771 MiB of it `vkAllocateMemory depth target`. A local log of depth-surface creation (not part of this PR) showed 751 single-sample D32 surfaces at only 23 addresses, 177 of them at each of three addresses, with extents such as 3840x2160, 3132x1762, 2944x1656 and 2926x1646; 4 were released. ### Tested `tests/DepthSurfaceReuse.cpp` adds `TestDisplacedSurfaceRelease`: three depth surfaces of different extents at one address, then a surface at another address (which runs `releaseRetired`). The two displaced surfaces must have freed their images and the owner must keep its image. On `main` `f6232fcfda` with only this test, `agc_driver_graphics` fails with "a depth surface whose address a surface of another extent took over must free its image"; with this change `agc_driver_graphics` passes (`VK_LAYER_KHRONOS_validation`, `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`; no `VUID-` lines). Measured in the title on the same base (`main` `f6232fcfda`), with the two arms run alternately (details in https://github.com/boykopovar/AnyPS5/pull/15404#issuecomment-6598654709). In full-length runs that reached the same briefing cutscene, peak `vkAllocateMemory depth target` memory was 6,403 and 6,481 MiB with this change, against 16,645 and 22,899 MiB on `main`. Device-local usage still exceeds the 8 GiB budget, at 10.6 to 10.8 GiB instead of 17.2 to 23.1 GiB. Runs of both builds can stop at about 100 s from a separate heap corruption in this title, which also occurs on `main`. ### 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: none - [x] GPUs tested: AMD Radeon RX 6650 XT (RADV NAVI23), Mesa 26.2.6, Arch Linux - [x] AI-assisted: yes
MarcZX10 commented 2026-11-03 05:44:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-03T05:44:49Z.

Review: COMMENTED


Reviewed — no blocking findings

The exact-head source review found no blocking defect in retiring a displaced single-sample surface after it relinquishes both tracked planes; hosted checks are still pending, so this is a comment rather than an approval.

What I ran

Reviewed both changed files at head 03a48a20a5226dfcf74254b35cbe6673cd426145 against base d1ae628bc2f62459cce1e9872ba5632c938c71f2; the merge preview is clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. The repository precheck and convention command were run; I did not configure or build AnyPS5.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 15404
git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...03a48a20a5226dfcf74254b35cbe6673cd426145
python3 tools/check_conventions.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2 --head 03a48a20a5226dfcf74254b35cbe6673cd426145 --title 'fix(agc): retire a depth surface once a surface of another extent takes its planes' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/pr-body.md
git merge-tree --write-tree d1ae628bc2f62459cce1e9872ba5632c938c71f2 03a48a20a5226dfcf74254b35cbe6673cd426145
gh pr checks 15404 --repo boykopovar/AnyPS5

Results

Check Result Note
Diff and conventions passed No whitespace errors; repository conventions passed.
Merge preview passed Clean against the PR base.
Source and test review passed Both changed files read; displacement and deferred release paths inspected.
Optional ABI and test-quality helpers not run Helpers are absent from the isolated PR snapshot.
Hosted checks not run All six checks were queued at review time.
Local GPU build and tests not run They require a build and Vulkan-capable runtime.
Commands and unedited output
$ git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...03a48a20a5226dfcf74254b35cbe6673cd426145
[no output]

$ python3 tools/check_conventions.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2 --head 03a48a20a5226dfcf74254b35cbe6673cd426145 --title 'fix(agc): retire a depth surface once a surface of another extent takes its planes' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/pr-body.md
All conventions checks passed.

$ git merge-tree --write-tree d1ae628bc2f62459cce1e9872ba5632c938c71f2 03a48a20a5226dfcf74254b35cbe6673cd426145
0a95b7befde568a54e4d49f05befc0d92fba1666

$ gh pr checks 15404 --repo boykopovar/AnyPS5
conventions	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41585139846/job/125748756357
eligibility	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125748753843
intake	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41585139831/job/125748755138
labels	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41585139766/job/125748754513
library-portability	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41585139851/job/125748753544
report	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41585139999/job/125748753960

The precheck reported checks failed only because its optional tools/pr_abi_audit.py and tools/pr_test_quality.py scripts were absent from the isolated PR snapshot; this PR changes no exports. Its diff, conventions and live mergeability checks passed.

Negative control

I did not run a negative control: the added regression test needs the exact-head AGC test binary and Vulkan test setup, and no build was performed.

Findings

Blocking

None found in the reviewed change.

Non-blocking

The new regression asserts that displaced images are released and the current image remains alive. It does not directly assert guest-memory contents after retiring stale depth data; the implementation delegates that operation to the existing retireStoringStale path, which I inspected but did not execute here.

Sources

Not verified

No local build, CTest, Vulkan validation run, console behavior or reproduced title memory measurement was performed. The author's AMD GPU test and main-versus-change observation are reported in the PR description, not reproduced here. Hosted checks were pending at the final refresh.

To get this to a good state

No code change is requested from this source review. I will refresh the hosted checks on this head and update the review if they complete; if the head changes, I will inspect the new diff and rerun relevant checks.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5747719277 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15404#pullrequestreview-5747719277). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-03T05:44:49Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The exact-head source review found no blocking defect in retiring a displaced single-sample surface after it relinquishes both tracked planes; hosted checks are still pending, so this is a comment rather than an approval. ## What I ran Reviewed both changed files at head `03a48a20a5226dfcf74254b35cbe6673cd426145` against base `d1ae628bc2f62459cce1e9872ba5632c938c71f2`; the merge preview is clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. The repository precheck and convention command were run; I did not configure or build AnyPS5. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 15404 git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...03a48a20a5226dfcf74254b35cbe6673cd426145 python3 tools/check_conventions.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2 --head 03a48a20a5226dfcf74254b35cbe6673cd426145 --title 'fix(agc): retire a depth surface once a surface of another extent takes its planes' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/pr-body.md git merge-tree --write-tree d1ae628bc2f62459cce1e9872ba5632c938c71f2 03a48a20a5226dfcf74254b35cbe6673cd426145 gh pr checks 15404 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | Note | |---|---|---| | Diff and conventions | passed | No whitespace errors; repository conventions passed. | | Merge preview | passed | Clean against the PR base. | | Source and test review | passed | Both changed files read; displacement and deferred release paths inspected. | | Optional ABI and test-quality helpers | not run | Helpers are absent from the isolated PR snapshot. | | Hosted checks | not run | All six checks were queued at review time. | | Local GPU build and tests | not run | They require a build and Vulkan-capable runtime. | <details> <summary>Commands and unedited output</summary> ```text $ git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...03a48a20a5226dfcf74254b35cbe6673cd426145 [no output] $ python3 tools/check_conventions.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2 --head 03a48a20a5226dfcf74254b35cbe6673cd426145 --title 'fix(agc): retire a depth surface once a surface of another extent takes its planes' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/pr-body.md All conventions checks passed. $ git merge-tree --write-tree d1ae628bc2f62459cce1e9872ba5632c938c71f2 03a48a20a5226dfcf74254b35cbe6673cd426145 0a95b7befde568a54e4d49f05befc0d92fba1666 $ gh pr checks 15404 --repo boykopovar/AnyPS5 conventions pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41585139846/job/125748756357 eligibility pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125748753843 intake pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41585139831/job/125748755138 labels pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41585139766/job/125748754513 library-portability pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41585139851/job/125748753544 report pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41585139999/job/125748753960 ``` The precheck reported `checks failed` only because its optional `tools/pr_abi_audit.py` and `tools/pr_test_quality.py` scripts were absent from the isolated PR snapshot; this PR changes no exports. Its diff, conventions and live mergeability checks passed. </details> ## Negative control I did not run a negative control: the added regression test needs the exact-head AGC test binary and Vulkan test setup, and no build was performed. ## Findings ### Blocking None found in the reviewed change. ### Non-blocking The new regression asserts that displaced images are released and the current image remains alive. It does not directly assert guest-memory contents after retiring stale depth data; the implementation delegates that operation to the existing `retireStoringStale` path, which I inspected but did not execute here. ## Sources - [Plane ownership and displaced-surface retirement at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/03a48a20a5226dfcf74254b35cbe6673cd426145/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp#L1895-L1916) - [Stale depth storage and retirement implementation](https://github.com/boykopovar/AnyPS5/blob/03a48a20a5226dfcf74254b35cbe6673cd426145/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp#L2316-L2335) - [Displaced-surface regression test](https://github.com/boykopovar/AnyPS5/blob/03a48a20a5226dfcf74254b35cbe6673cd426145/core/libs/prx/libSceAgcDriver/tests/DepthSurfaceReuse.cpp#L452-L467) ## Not verified No local build, CTest, Vulkan validation run, console behavior or reproduced title memory measurement was performed. The author's AMD GPU test and main-versus-change observation are reported in the PR description, not reproduced here. Hosted checks were pending at the final refresh. ## To get this to a good state No code change is requested from this source review. I will refresh the hosted checks on this head and update the review if they complete; if the head changes, I will inspect the new diff and rerun relevant checks.
MarcZX10 commented 2026-11-03 07:37:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-03T07:37:42Z.

Review: APPROVED


Re-checked — same head, looks good

The exact-head source review found no blocking issue, and all applicable hosted checks now pass; the author reports the matched AMD Vulkan regression run succeeded.

What I ran

Re-checked open PR #15404 at head 03a48a20a5226dfcf74254b35cbe6673cd426145 against base d1ae628bc2f62459cce1e9872ba5632c938c71f2; the source diff is unchanged from the earlier full review and merges cleanly. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I ran the no-build precheck, inspected the two changed files, verified the new test is included in agc_driver_graphics_tests, and refreshed hosted checks. I did not build locally.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 15404
git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...03a48a20a5226dfcf74254b35cbe6673cd426145
git merge-tree --write-tree d1ae628bc2f62459cce1e9872ba5632c938c71f2 03a48a20a5226dfcf74254b35cbe6673cd426145
python3 tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/head-03a48a20a522-c8802fa9 --json core/libs/prx/libSceAgcDriver/tests/DepthSurfaceReuse.cpp
git grep -n 'DepthSurfaceReuse.cpp' 03a48a20a5226dfcf74254b35cbe6673cd426145 -- core/libs/prx/libSceAgcDriver/tests/cmake
gh pr checks 15404 --repo boykopovar/AnyPS5

Results

Check Result Note
Diff, conventions and merge preview passed Precheck passed these checks; merge tree is clean.
Test registration passed The graphics CMake target includes the changed test source.
Test-quality heuristic failed It reported possible missing registration; direct CMake inspection disproves that warning.
Applicable hosted checks passed Windows, conventions, intake, labels, eligibility, report and library portability passed.
Hosted GPU and specialized jobs not applicable Linux, relinker and related jobs were skipped.
Local build and Vulkan test not run No build or hardware execution was performed here.
Precheck table and unedited hosted check output
| Check | Status | Command / reason |
|---|---|---|
| build_and_compile | not_applicable | `The precheck deliberately does not configure, build, or compile AnyPS5.` |
| diff_check | passed | `git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...03a48a20a5226dfcf74254b35cbe6673cd426145` |
| conventions_and_pr_template | passed | `/usr/bin/python3 tools/check_conventions.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2 --head 03a48a20a5226dfcf74254b35cbe6673cd426145 --title fix(agc): retire a depth surface once a surface of another extent takes its planes --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/pr-body.md` |
| changed_export_abi_audit | failed | `/usr/bin/python3 tools/pr_abi_audit.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2 --head 03a48a20a5226dfcf74254b35cbe6673cd426145 --json` |
| python_syntax | not_applicable | `No changed Python implementation files.` |
| related_python_unit_tests | not_applicable | `No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.` |
| python_test_registration | not_applicable | `No changed test_*.py files.` |
| live_dependency_and_mergeability_check | passed | `/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 15404 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/stack` |
| build_dependent_cpp_tests | not_applicable | `Not run: C++ tests need exact-head binaries, which require a build; the precheck does not build.` |
| test_quality_heuristics | failed | `/usr/bin/python3 /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/head-03a48a20a522-c8802fa9/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/head-03a48a20a522-c8802fa9 --json core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp core/libs/prx/libSceAgcDriver/tests/DepthSurfaceReuse.cpp` |
| negative_controls | not_applicable | `No changed Python test module in tools/ can be run as a no-build base-source control.` |

The precheck's optional helper errors were:

/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/head-03a48a20a522-c8802fa9/tools/pr_abi_audit.py': [Errno 2] No such file or directory
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/head-03a48a20a522-c8802fa9/tools/pr_test_quality.py': [Errno 2] No such file or directory

The separately run test-quality heuristic returned:

{
  "findings": [
    {
      "path": "core/libs/prx/libSceAgcDriver/tests/DepthSurfaceReuse.cpp",
      "line": 1,
      "kind": "possible-unregistered-cpp-test",
      "message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage."
    }
  ],
  "negative_control_candidates": [],
  "limits": [
    "Heuristics can miss weak assertions and can flag valid tests; inspect every finding.",
    "A test that passes against base is not by itself proof that the PR test is inadequate.",
    "Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error."
  ]
}
edge-watch\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125758653533
linux\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125758652813
register-context\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125758652720
relinker\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125758653361
library-portability\tpass\t1m56s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139851/job/125748753544
report\tpass\t59s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139999/job/125748753960
windows\tpass\t9m23s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125758651449
relinker-asan\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125758652762
intake\tpass\t6s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139831/job/125748755138
write-watch\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125758653590
conventions\tpass\t20s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139846/job/125748756357
eligibility\tpass\t4s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125748753843
labels\tpass\t8s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139766/job/125748754513

Negative control

I did not run one. The author reports that the new assertion fails on main and passes on this head under the stated AMD/Vulkan-validation setup; that hardware result is author-reported, not reproduced here.

Findings

Blocking

None found in the reviewed change.

Non-blocking

The regression directly checks displaced image destruction and preservation of the current owner. The author reports the focused GPU test also passed with validation enabled and no VUID lines. The title memory measurement is from main only; the PR does not claim a measured reduction on the changed build.

Sources

Not verified

I did not independently run the AMD test, Vulkan validation, console behavior or a same-scene memory comparison. The author says the memory comparison remains unavailable because the title crashes on both builds before the relevant scene. No local build or CTest was run.

To get this to a good state

No change is requested for this reviewed head. If the head changes, I will review the new diff and rerun the applicable checks.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5748610466 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15404#pullrequestreview-5748610466). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-03T07:37:42Z. **Review:** APPROVED --- # Re-checked — same head, looks good The exact-head source review found no blocking issue, and all applicable hosted checks now pass; the author reports the matched AMD Vulkan regression run succeeded. ## What I ran Re-checked open PR #15404 at head `03a48a20a5226dfcf74254b35cbe6673cd426145` against base `d1ae628bc2f62459cce1e9872ba5632c938c71f2`; the source diff is unchanged from the earlier full review and merges cleanly. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I ran the no-build precheck, inspected the two changed files, verified the new test is included in `agc_driver_graphics_tests`, and refreshed hosted checks. I did not build locally. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 15404 git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...03a48a20a5226dfcf74254b35cbe6673cd426145 git merge-tree --write-tree d1ae628bc2f62459cce1e9872ba5632c938c71f2 03a48a20a5226dfcf74254b35cbe6673cd426145 python3 tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/head-03a48a20a522-c8802fa9 --json core/libs/prx/libSceAgcDriver/tests/DepthSurfaceReuse.cpp git grep -n 'DepthSurfaceReuse.cpp' 03a48a20a5226dfcf74254b35cbe6673cd426145 -- core/libs/prx/libSceAgcDriver/tests/cmake gh pr checks 15404 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | Note | |---|---|---| | Diff, conventions and merge preview | passed | Precheck passed these checks; merge tree is clean. | | Test registration | passed | The graphics CMake target includes the changed test source. | | Test-quality heuristic | failed | It reported possible missing registration; direct CMake inspection disproves that warning. | | Applicable hosted checks | passed | Windows, conventions, intake, labels, eligibility, report and library portability passed. | | Hosted GPU and specialized jobs | not applicable | Linux, relinker and related jobs were skipped. | | Local build and Vulkan test | not run | No build or hardware execution was performed here. | <details> <summary>Precheck table and unedited hosted check output</summary> ```text | Check | Status | Command / reason | |---|---|---| | build_and_compile | not_applicable | `The precheck deliberately does not configure, build, or compile AnyPS5.` | | diff_check | passed | `git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...03a48a20a5226dfcf74254b35cbe6673cd426145` | | conventions_and_pr_template | passed | `/usr/bin/python3 tools/check_conventions.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2 --head 03a48a20a5226dfcf74254b35cbe6673cd426145 --title fix(agc): retire a depth surface once a surface of another extent takes its planes --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/pr-body.md` | | changed_export_abi_audit | failed | `/usr/bin/python3 tools/pr_abi_audit.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2 --head 03a48a20a5226dfcf74254b35cbe6673cd426145 --json` | | python_syntax | not_applicable | `No changed Python implementation files.` | | related_python_unit_tests | not_applicable | `No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.` | | python_test_registration | not_applicable | `No changed test_*.py files.` | | live_dependency_and_mergeability_check | passed | `/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 15404 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/stack` | | build_dependent_cpp_tests | not_applicable | `Not run: C++ tests need exact-head binaries, which require a build; the precheck does not build.` | | test_quality_heuristics | failed | `/usr/bin/python3 /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/head-03a48a20a522-c8802fa9/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/head-03a48a20a522-c8802fa9 --json core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp core/libs/prx/libSceAgcDriver/tests/DepthSurfaceReuse.cpp` | | negative_controls | not_applicable | `No changed Python test module in tools/ can be run as a no-build base-source control.` | ``` The precheck's optional helper errors were: ```text /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/head-03a48a20a522-c8802fa9/tools/pr_abi_audit.py': [Errno 2] No such file or directory /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15404-03a48a20a522/head-03a48a20a522-c8802fa9/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` The separately run test-quality heuristic returned: ```text { "findings": [ { "path": "core/libs/prx/libSceAgcDriver/tests/DepthSurfaceReuse.cpp", "line": 1, "kind": "possible-unregistered-cpp-test", "message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage." } ], "negative_control_candidates": [], "limits": [ "Heuristics can miss weak assertions and can flag valid tests; inspect every finding.", "A test that passes against base is not by itself proof that the PR test is inadequate.", "Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error." ] } ``` ```text edge-watch\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125758653533 linux\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125758652813 register-context\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125758652720 relinker\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125758653361 library-portability\tpass\t1m56s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139851/job/125748753544 report\tpass\t59s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139999/job/125748753960 windows\tpass\t9m23s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125758651449 relinker-asan\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125758652762 intake\tpass\t6s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139831/job/125748755138 write-watch\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125758653590 conventions\tpass\t20s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139846/job/125748756357 eligibility\tpass\t4s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139828/job/125748753843 labels\tpass\t8s\thttps://github.com/boykopovar/AnyPS5/actions/runs/41585139766/job/125748754513 ``` </details> ## Negative control I did not run one. The author reports that the new assertion fails on `main` and passes on this head under the stated AMD/Vulkan-validation setup; that hardware result is author-reported, not reproduced here. ## Findings ### Blocking None found in the reviewed change. ### Non-blocking The regression directly checks displaced image destruction and preservation of the current owner. The author reports the focused GPU test also passed with validation enabled and no VUID lines. The title memory measurement is from `main` only; the PR does not claim a measured reduction on the changed build. ## Sources - [Displaced-plane retirement at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/03a48a20a5226dfcf74254b35cbe6673cd426145/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp#L1895-L1916) - [Stale depth storage implementation](https://github.com/boykopovar/AnyPS5/blob/03a48a20a5226dfcf74254b35cbe6673cd426145/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp#L2316-L2335) - [Regression test and CMake registration](https://github.com/boykopovar/AnyPS5/blob/03a48a20a5226dfcf74254b35cbe6673cd426145/core/libs/prx/libSceAgcDriver/tests/DepthSurfaceReuse.cpp#L452-L467), [graphics test target](https://github.com/boykopovar/AnyPS5/blob/03a48a20a5226dfcf74254b35cbe6673cd426145/core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake#L19-L31) ## Not verified I did not independently run the AMD test, Vulkan validation, console behavior or a same-scene memory comparison. The author says the memory comparison remains unavailable because the title crashes on both builds before the relevant scene. No local build or CTest was run. ## To get this to a good state No change is requested for this reviewed head. If the head changes, I will review the new diff and rerun the applicable checks.
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!15404
No description provided.