feat(agc): suballocate sampled and storage image memory #10472

Merged
nikhilpanchal1 merged 7 commits from upstream-pr/10472 into main 2026-11-04 04:48:36 +00:00
nikhilpanchal1 commented 2026-10-24 02:18:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by nikhilpanchal1 on 2026-10-24T02:18:16Z.


What

Small texture images currently consume one Vulkan memory allocation each, even when many compatible images could share a block. Allocate eligible optimal images up to 1 MiB from aligned ranges in 4 MiB blocks, using the existing buffer-pool infrastructure with a separate image arena.

  • Carry move-only allocation ownership through sampled textures, storage textures, attachment proxies, sRGB expansion and repacked/copy images. Bind each image at its assigned offset and retain its allocation through deferred GPU uploads.
  • Query image and dedicated-allocation requirements. Honor required/preferred dedicated allocations, preserve whole allocations for ineligible images, and reject unsupported binding modes explicitly.
  • Reuse compatible device-local ranges before deciding placement from the memory budget. Check headroom for the full block, fall back to an exact-size allocation when a new block is refused, and recheck ranges released by cache eviction before another driver allocation.
  • Count physical memory returned by cache destruction. Evicting one sibling reports zero reclaimed bytes until the whole shared block becomes reclaimable; this prevents retries from stopping after evicting only a small fraction of the necessary memory.
  • Add allocator and Vulkan regressions, preserve the existing whole-allocation fault-injection controls, and add default-suballocation cache-budget coverage. Document the policy and APS5_NO_IMAGE_SLABS diagnostic switch.

The deterministic allocation-count test serves 4,096 simultaneous 64 KiB images with 64 driver allocations, compared with 4,096 with suballocation disabled. Both modes allocate 256 MiB. No game frame-time or throughput measurement is claimed.

Related to #6890; this does not resolve cases where the live image working set itself exceeds available memory. No issue is closed by this PR.

Overlap audit:

The required tools/pr_overlap.py --branch perf/agc-image-suballocation --repo boykopovar/AnyPS5 audit completed. It found four text conflicts with separate features:

  • #7085 adds extra guest mip backing images. Combining the branches must retain its extra-mip owners and aggregate byte accounting while preserving this PR's primary-image lease and bind offset.
  • #8419 edits the neighboring host-fallback debt sentence; both documentation changes should be retained.
  • #9626 and #9875 add tests at the same CMake insertion point; both sets of registrations should be retained.

None implements this image suballocator or is a functional prerequisite. Merge order has not been agreed. The audit also reports stale branches that already conflict with main and can only be compared at shared-file level. The allocator-related changes in #4472, #7642, #9508 and #10193 were inspected separately: they concern device-buffer retention or descriptor addressing, not image backing-memory suballocation. No combined-runtime result with those open branches is claimed.

Tested

Debian 13 x86-64, Release, GCC 14.2.0. Vulkan execution used Mesa llvmpipe/lavapipe 25.0.7 (LLVM 19.1.7, 256 bits) and Khronos validation 1.4.309.

Fresh focused comparison after rebasing onto main db6af9e0fd8c75366dabc2066dbf90117f7490d0:

Revision Selected Passed Failed Skipped
Clean main db6af9e0fd 68 52 12 4
This PR 13829a4bb9 72 56 12 4

No new failures or skips. The same eight write-watch-related failures and four native-depth expectation failures occur on both revisions. Three skips require unavailable write watching; the fourth concerns lavapipe pipeline-cache behavior. This is a focused runtime/allocator matrix, not a full-suite pass.

Both revisions ran the same focused matrix on the same machine with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, using verbose CTest output. Both logs have zero VUID- messages and no missing-validation-layer message.

  • Allocator tests passed in optimized, ASan/UBSan with leak detection, and ThreadSanitizer builds. Coverage includes variable alignment and fragmentation, memory-type separation, dedicated allocations, budget and exact-size fallback, ownership/moves, 72 metadata-allocation fault positions, invalid output handles on driver failure, allocation-free returns, trimming, reentrant reclamation and concurrent allocation/release.
  • Vulkan tests passed for image sharing/alignment/nonoverlap, sampled upload lifetimes, storage-image pixel isolation and constructor-failure cleanup. Pressure tests filled two shared blocks and exercised both small-image reuse and standalone-allocation retry after injected OOM. Partial shared-block eviction reported 0 bytes; releasing the final sibling reported the full 4 MiB.
  • The four new CTest cases passed 25 repetitions each on committed head 13829a4bb9 after the rebase (100/100), all with 30-second timeouts. The native pressure cases executed rather than skipping.
  • Negative controls failed at the intended sharing/allocation-count assertions with suballocation disabled. The whole-allocation lifetime controls continued to pass.
  • Supplemental Windows x64 MinGW POSIX GCC 14.2 compilation/linking passed for the allocator fixture and its production allocator sources; the Vulkan fixture also compiled. Windows runtime execution and physical-GPU/title runs were not performed.
  • Repository conventions and whitespace checks passed. The required overlap audit completed; integration details are listed above.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: Mesa llvmpipe/lavapipe (LLVM 19.1.7, 256 bits), Mesa 25.0.7, Debian 13 Linux x86-64
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4991724856 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10472). Originally posted by [nikhilpanchal1](https://github.com/nikhilpanchal1) on 2026-10-24T02:18:16Z. --- ### What Small texture images currently consume one Vulkan memory allocation each, even when many compatible images could share a block. Allocate eligible optimal images up to 1 MiB from aligned ranges in 4 MiB blocks, using the existing buffer-pool infrastructure with a separate image arena. - Carry move-only allocation ownership through sampled textures, storage textures, attachment proxies, sRGB expansion and repacked/copy images. Bind each image at its assigned offset and retain its allocation through deferred GPU uploads. - Query image and dedicated-allocation requirements. Honor required/preferred dedicated allocations, preserve whole allocations for ineligible images, and reject unsupported binding modes explicitly. - Reuse compatible device-local ranges before deciding placement from the memory budget. Check headroom for the full block, fall back to an exact-size allocation when a new block is refused, and recheck ranges released by cache eviction before another driver allocation. - Count physical memory returned by cache destruction. Evicting one sibling reports zero reclaimed bytes until the whole shared block becomes reclaimable; this prevents retries from stopping after evicting only a small fraction of the necessary memory. - Add allocator and Vulkan regressions, preserve the existing whole-allocation fault-injection controls, and add default-suballocation cache-budget coverage. Document the policy and `APS5_NO_IMAGE_SLABS` diagnostic switch. The deterministic allocation-count test serves 4,096 simultaneous 64 KiB images with 64 driver allocations, compared with 4,096 with suballocation disabled. Both modes allocate 256 MiB. No game frame-time or throughput measurement is claimed. Related to #6890; this does not resolve cases where the live image working set itself exceeds available memory. No issue is closed by this PR. Overlap audit: The required `tools/pr_overlap.py --branch perf/agc-image-suballocation --repo boykopovar/AnyPS5` audit completed. It found four text conflicts with separate features: - #7085 adds extra guest mip backing images. Combining the branches must retain its extra-mip owners and aggregate byte accounting while preserving this PR's primary-image lease and bind offset. - #8419 edits the neighboring host-fallback debt sentence; both documentation changes should be retained. - #9626 and #9875 add tests at the same CMake insertion point; both sets of registrations should be retained. None implements this image suballocator or is a functional prerequisite. Merge order has not been agreed. The audit also reports stale branches that already conflict with main and can only be compared at shared-file level. The allocator-related changes in #4472, #7642, #9508 and #10193 were inspected separately: they concern device-buffer retention or descriptor addressing, not image backing-memory suballocation. No combined-runtime result with those open branches is claimed. ### Tested Debian 13 x86-64, Release, GCC 14.2.0. Vulkan execution used Mesa llvmpipe/lavapipe 25.0.7 (LLVM 19.1.7, 256 bits) and Khronos validation 1.4.309. Fresh focused comparison after rebasing onto `main` `db6af9e0fd8c75366dabc2066dbf90117f7490d0`: | Revision | Selected | Passed | Failed | Skipped | | --- | ---: | ---: | ---: | ---: | | Clean main `db6af9e0fd` | 68 | 52 | 12 | 4 | | This PR `13829a4bb9` | 72 | 56 | 12 | 4 | No new failures or skips. The same eight write-watch-related failures and four native-depth expectation failures occur on both revisions. Three skips require unavailable write watching; the fourth concerns lavapipe pipeline-cache behavior. This is a focused runtime/allocator matrix, not a full-suite pass. Both revisions ran the same focused matrix on the same machine with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, using verbose CTest output. Both logs have zero `VUID-` messages and no missing-validation-layer message. - Allocator tests passed in optimized, ASan/UBSan with leak detection, and ThreadSanitizer builds. Coverage includes variable alignment and fragmentation, memory-type separation, dedicated allocations, budget and exact-size fallback, ownership/moves, 72 metadata-allocation fault positions, invalid output handles on driver failure, allocation-free returns, trimming, reentrant reclamation and concurrent allocation/release. - Vulkan tests passed for image sharing/alignment/nonoverlap, sampled upload lifetimes, storage-image pixel isolation and constructor-failure cleanup. Pressure tests filled two shared blocks and exercised both small-image reuse and standalone-allocation retry after injected OOM. Partial shared-block eviction reported 0 bytes; releasing the final sibling reported the full 4 MiB. - The four new CTest cases passed 25 repetitions each on committed head `13829a4bb9` after the rebase (100/100), all with 30-second timeouts. The native pressure cases executed rather than skipping. - Negative controls failed at the intended sharing/allocation-count assertions with suballocation disabled. The whole-allocation lifetime controls continued to pass. - Supplemental Windows x64 MinGW POSIX GCC 14.2 compilation/linking passed for the allocator fixture and its production allocator sources; the Vulkan fixture also compiled. Windows runtime execution and physical-GPU/title runs were not performed. - Repository conventions and whitespace checks passed. The required overlap audit completed; integration details are listed above. <!-- 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. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> Mesa llvmpipe/lavapipe (LLVM 19.1.7, 256 bits), Mesa 25.0.7, Debian 13 Linux x86-64 - [x] AI-assisted: <!-- yes / no --> yes
MarcZX10 commented 2026-10-24 16:01:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T16:01:12Z.

Review: CHANGES_REQUESTED


The allocator design and the extensive earlier test report are useful, but the evidence stops at commit 13829a4bb9. The current PR head adds 05b1532d74, changing the allocation path for alignments that can hold only one image per 4 MiB block and adding new pressure/alignment coverage; the reported 25-repeat matrix and main-vs-change validation comparison do not include this head. Because this is an AGC change, please rerun the focused allocator/Vulkan tests on the current head and compare the same validation-layer matrix against current main 3fcb5e4d76 on the same device, confirming the layer loaded and no new VUIDs. Also resolve the current-main merge conflict in docs/dev/debt/libSceAgcDriver.md while retaining both debt updates. I did not run the full Vulkan matrix locally.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5638877332 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10472#pullrequestreview-5638877332). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-24T16:01:12Z. **Review:** CHANGES_REQUESTED --- The allocator design and the extensive earlier test report are useful, but the evidence stops at commit `13829a4bb9`. The current PR head adds `05b1532d74`, changing the allocation path for alignments that can hold only one image per 4 MiB block and adding new pressure/alignment coverage; the reported 25-repeat matrix and main-vs-change validation comparison do not include this head. Because this is an AGC change, please rerun the focused allocator/Vulkan tests on the current head and compare the same validation-layer matrix against current main `3fcb5e4d76` on the same device, confirming the layer loaded and no new VUIDs. Also resolve the current-main merge conflict in `docs/dev/debt/libSceAgcDriver.md` while retaining both debt updates. I did not run the full Vulkan matrix locally.
MarcZX10 commented 2026-10-29 08:18:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T08:18:57Z.

Review: CHANGES_REQUESTED


Re-reviewed exact head fb8c3ee7ad49cda6dded674627b6dddcfddbe8f5 against live main 4c7d275bef89d309313d16bc2bc05d37a1b50be2.

The earlier debt-file merge conflict is resolved; the current-main preview is clean (1975f3e3ac766b4dfce869ae171cd465173795d3), git diff --check passes, and conventions pass. The new commits also address the WinLibs stack overflow in the test fixture, restore the public AllocateMemory contract, avoid 4 MiB slabs that cannot fit a second image, and check device-teardown allocations.

Changes requested

  1. The posted runtime matrix does not cover the current head. The Tested section reports the 68/72-test comparison and 25-repeat cases on 13829a4bb9; the current branch adds e231a7ddc0 and fb8c3ee7ad, which change the allocator, Vulkan fixture lifecycle and DepthSurface.cpp integration. Please rerun the focused matrix on exact current main and this exact head, including validation-layer load/VUID results and the new alignment/teardown cases. Hosted AGC product jobs are skipped, so they do not cover these changes.
  2. Some device-dependent assertions can silently be skipped while CTest passes. In tests/execution/ImageMemory.cpp, sharing is required only when eligible > 1, and CachePressure returns normally when its probe image requires/prefer dedicated memory or cannot fit a shared pair. The RTX 3080 report confirms those subcases ran on that machine (8/8 and 16/16 eligible), but another supported device can report the test as passed without exercising the central sharing/pressure checks. Please report a CTest skip when those preconditions are unavailable, or fail explicitly when a test mode promises sharing coverage.
  3. Record the over-eviction tradeoff. The review question about pressure reclaiming all idle sampled entries while only whole empty image blocks count as released remains unanswered. The debt entry documents non-compaction and one retained empty block, but not this cache-eviction behavior or its unmeasured title cost. Please document that limitation or provide a title measurement.

The report that none of the RTX 3080 fixture images preferred dedicated allocation is useful for that device only; it does not establish how often titles hit the dedicated path. I did not run the Vulkan/GPU tests locally. The current code and checks otherwise look materially improved; this review is held on exact-head runtime coverage and the test-skip semantics above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5694670467 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10472#pullrequestreview-5694670467). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T08:18:57Z. **Review:** CHANGES_REQUESTED --- Re-reviewed exact head `fb8c3ee7ad49cda6dded674627b6dddcfddbe8f5` against live `main` `4c7d275bef89d309313d16bc2bc05d37a1b50be2`. The earlier debt-file merge conflict is resolved; the current-main preview is clean (`1975f3e3ac766b4dfce869ae171cd465173795d3`), `git diff --check` passes, and conventions pass. The new commits also address the WinLibs stack overflow in the test fixture, restore the public `AllocateMemory` contract, avoid 4 MiB slabs that cannot fit a second image, and check device-teardown allocations. ### Changes requested 1. **The posted runtime matrix does not cover the current head.** The Tested section reports the 68/72-test comparison and 25-repeat cases on `13829a4bb9`; the current branch adds `e231a7ddc0` and `fb8c3ee7ad`, which change the allocator, Vulkan fixture lifecycle and `DepthSurface.cpp` integration. Please rerun the focused matrix on exact current `main` and this exact head, including validation-layer load/VUID results and the new alignment/teardown cases. Hosted AGC product jobs are skipped, so they do not cover these changes. 2. **Some device-dependent assertions can silently be skipped while CTest passes.** In `tests/execution/ImageMemory.cpp`, sharing is required only when `eligible > 1`, and `CachePressure` returns normally when its probe image requires/prefer dedicated memory or cannot fit a shared pair. The RTX 3080 report confirms those subcases ran on that machine (8/8 and 16/16 eligible), but another supported device can report the test as passed without exercising the central sharing/pressure checks. Please report a CTest skip when those preconditions are unavailable, or fail explicitly when a test mode promises sharing coverage. 3. **Record the over-eviction tradeoff.** The review question about pressure reclaiming all idle sampled entries while only whole empty image blocks count as released remains unanswered. The debt entry documents non-compaction and one retained empty block, but not this cache-eviction behavior or its unmeasured title cost. Please document that limitation or provide a title measurement. The report that none of the RTX 3080 fixture images preferred dedicated allocation is useful for that device only; it does not establish how often titles hit the dedicated path. I did not run the Vulkan/GPU tests locally. The current code and checks otherwise look materially improved; this review is held on exact-head runtime coverage and the test-skip semantics above.
jotitadev commented 2026-10-30 21:58:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-30T21:58:21Z.

Review: COMMENTED


A run of the current head on NVIDIA and lavapipe under Linux. The four ImageMemory failures @bunbeans2-arch saw on RDNA 4 reproduce on the RTX 3070 at this head. They come from the test's hook bookkeeping, not from a leak: the leftover 512 KiB host-pointer import is freed, but through a vkFreeMemory the hook doesn't wrap. A 2-line test change makes them pass.

Setup. Ubuntu 26.04, GCC 15.2, Release. RTX 3070 (NVIDIA 595.99.02, the NVIDIA CI's driver) and lavapipe (Mesa 26.0.3). ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, ctest -j1. Head 0077d11da8 merged onto main 7d9a2fc713 (clean). I ran the 128 tests of the binaries the PR touches: agc_image_memory, the agc_driver_image_memory* tests, the storage cache budget tests, agc_driver_graphics* and agc_driver_recorder*.

3070, VVL 1.4.341 (×3) 3070, no layer 3070, VVL 1.3.275 (the CI's) lavapipe, VVL 1.4.341 (×3)
124 others pass pass pass pass
agc_driver_image_memory, _teardown_failure fail pass fail pass
agc_driver_image_memory_no_slabs, _no_slabs_teardown_failure fail fail fail pass

All four fail with image memory: device teardown retained hooked driver allocations. That is the same split @bunbeans2-arch saw with and without the layer.

Cause. I added local prints to ~RetiredImport, ClearHostImports and CheckDeviceReleased. The leftover handle is the 524288-byte host import from createHostPointerImport. It is released before the check, by ~RetiredImport, through the vkFreeMemory the host-import state holds: fn=0x7f3bca6326e0, a driver/layer address, while the hook's Free was at 0x5a659baa8200. HostImports::freeMemory is only set when it is null or the device changes (GuestBufferMemory.cpp around line 2340), so it keeps a pointer resolved through a context without the test's deviceProc. The import's allocation does go through the hooked context, so Allocate records it and Free never sees it. In the passing run (no layer, slabs on), the one retired import was not in the hook's map. I didn't trace why the layer changes which import goes through the hooked context.

Fix (test only), verified. Don't record host-pointer imports in Allocate. They aren't image memory, and the import cache frees them itself:

+// Guest host-pointer imports are freed through the import cache's own vkFreeMemory, which can bypass these hooks.
+bool ImportsHostPointer(const VkMemoryAllocateInfo* info) {
+    for (auto* next = static_cast<const VkBaseInStructure*>(info->pNext); next != nullptr; next = next->pNext) {
+        if (next->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT) return true;
+    }
+    return false;
+}
...
-        if (result == VK_SUCCESS) {
+        if (result == VK_SUCCESS && !ImportsHostPointer(info)) {

With it, the five image_memory tests pass 3/3 on the 3070 with 1.4.341, 1/1 with no layer, 1/1 with 1.3.275 (only the known pNext-pNext), and 3/3 on lavapipe.

On the sharing check (@MarcZX10's point). On both devices every image is eligible and the pairs are observed: 8 images, 8 eligible, 28 pairs, and 16 images, 16 eligible, 120 pairs. As a red check, APS5_NO_IMAGE_SLABS=1 without --no-sharing-check fails 3/3 on the 3070 and on lavapipe with "simultaneous small production images each allocate separate memory". The eligible > 1 guard still lets a device with 0 or 1 eligible images pass silently, as he says; these two devices just don't hit it.

GPUs tested: NVIDIA RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3).

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5719120458 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10472#pullrequestreview-5719120458). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-30T21:58:21Z. **Review:** COMMENTED --- A run of the current head on NVIDIA and lavapipe under Linux. The four ImageMemory failures @bunbeans2-arch saw on RDNA 4 reproduce on the RTX 3070 at this head. They come from the test's hook bookkeeping, not from a leak: the leftover 512 KiB host-pointer import is freed, but through a `vkFreeMemory` the hook doesn't wrap. A 2-line test change makes them pass. **Setup.** Ubuntu 26.04, GCC 15.2, Release. RTX 3070 (NVIDIA 595.99.02, the NVIDIA CI's driver) and lavapipe (Mesa 26.0.3). `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`, ctest `-j1`. Head `0077d11da8` merged onto `main` `7d9a2fc713` (clean). I ran the 128 tests of the binaries the PR touches: `agc_image_memory`, the `agc_driver_image_memory*` tests, the storage cache budget tests, `agc_driver_graphics*` and `agc_driver_recorder*`. | | 3070, VVL 1.4.341 (×3) | 3070, no layer | 3070, VVL 1.3.275 (the CI's) | lavapipe, VVL 1.4.341 (×3) | |---|---|---|---|---| | 124 others | pass | pass | pass | pass | | `agc_driver_image_memory`, `_teardown_failure` | fail | pass | fail | pass | | `agc_driver_image_memory_no_slabs`, `_no_slabs_teardown_failure` | fail | fail | fail | pass | All four fail with `image memory: device teardown retained hooked driver allocations`. That is the same split @bunbeans2-arch saw with and without the layer. **Cause.** I added local prints to `~RetiredImport`, `ClearHostImports` and `CheckDeviceReleased`. The leftover handle is the 524288-byte host import from `createHostPointerImport`. It is released before the check, by `~RetiredImport`, through the `vkFreeMemory` the host-import state holds: `fn=0x7f3bca6326e0`, a driver/layer address, while the hook's `Free` was at `0x5a659baa8200`. `HostImports::freeMemory` is only set when it is null or the device changes (`GuestBufferMemory.cpp` around line 2340), so it keeps a pointer resolved through a context without the test's `deviceProc`. The import's allocation does go through the hooked context, so `Allocate` records it and `Free` never sees it. In the passing run (no layer, slabs on), the one retired import was not in the hook's map. I didn't trace why the layer changes which import goes through the hooked context. **Fix (test only), verified.** Don't record host-pointer imports in `Allocate`. They aren't image memory, and the import cache frees them itself: ```diff +// Guest host-pointer imports are freed through the import cache's own vkFreeMemory, which can bypass these hooks. +bool ImportsHostPointer(const VkMemoryAllocateInfo* info) { + for (auto* next = static_cast<const VkBaseInStructure*>(info->pNext); next != nullptr; next = next->pNext) { + if (next->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT) return true; + } + return false; +} ... - if (result == VK_SUCCESS) { + if (result == VK_SUCCESS && !ImportsHostPointer(info)) { ``` With it, the five `image_memory` tests pass 3/3 on the 3070 with 1.4.341, 1/1 with no layer, 1/1 with 1.3.275 (only the known `pNext-pNext`), and 3/3 on lavapipe. **On the sharing check (@MarcZX10's point).** On both devices every image is eligible and the pairs are observed: 8 images, 8 eligible, 28 pairs, and 16 images, 16 eligible, 120 pairs. As a red check, `APS5_NO_IMAGE_SLABS=1` without `--no-sharing-check` fails 3/3 on the 3070 and on lavapipe with "simultaneous small production images each allocate separate memory". The `eligible > 1` guard still lets a device with 0 or 1 eligible images pass silently, as he says; these two devices just don't hit it. GPUs tested: NVIDIA RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3). Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
jotitadev commented 2026-10-31 04:38:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-31T04:38:48Z.

Review: COMMENTED


Re-run of head eddcd8f4a6 merged onto main 0835ec8bdc: the four ImageMemory teardown failures from my earlier review are fixed on the RTX 3070.

Same setup as before: Ubuntu 26.04, GCC 15.2, Release, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, ctest -j1.

  • RTX 3070 (595.99.02), the 10 image_memory tests (including the new _hooks and four dedicated_*_skip): pass 3/3 with VVL 1.4.341, 1/1 with no layer, 1/1 with VVL 1.3.275 (only the known pNext-pNext). The sharing checks still observe pairs (8/8 eligible, 28 pairs; 16/16, 120 pairs), so they are not skipping.
  • lavapipe (Mesa 26.0.3), VVL 1.4.341: the 133 tests of the touched binaries pass 3/3, no VUID- errors.
  • Red check: dropping only && !ImportsHostPointer(info) in Allocate brings back device teardown retained hooked driver allocations on the 3070 (9 of 10 fail). On lavapipe, the new agc_driver_image_memory_hooks regression catches it, so the change is covered even on a device where the original failure doesn't show.

GPUs tested: NVIDIA RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3).

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5721285658 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10472#pullrequestreview-5721285658). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-31T04:38:48Z. **Review:** COMMENTED --- Re-run of head `eddcd8f4a6` merged onto `main` `0835ec8bdc`: the four ImageMemory teardown failures from my earlier review are fixed on the RTX 3070. Same setup as before: Ubuntu 26.04, GCC 15.2, Release, `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`, ctest `-j1`. - RTX 3070 (595.99.02), the 10 `image_memory` tests (including the new `_hooks` and four `dedicated_*_skip`): pass 3/3 with VVL 1.4.341, 1/1 with no layer, 1/1 with VVL 1.3.275 (only the known `pNext-pNext`). The sharing checks still observe pairs (8/8 eligible, 28 pairs; 16/16, 120 pairs), so they are not skipping. - lavapipe (Mesa 26.0.3), VVL 1.4.341: the 133 tests of the touched binaries pass 3/3, no `VUID-` errors. - Red check: dropping only `&& !ImportsHostPointer(info)` in `Allocate` brings back `device teardown retained hooked driver allocations` on the 3070 (9 of 10 fail). On lavapipe, the new `agc_driver_image_memory_hooks` regression catches it, so the change is covered even on a device where the original failure doesn't show. GPUs tested: NVIDIA RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3). Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
MarcZX10 commented 2026-10-31 12:03:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T12:03:47Z.

Review: CHANGES_REQUESTED


Re-checked — new head, current-main GPU comparison still needed

The new head resolves the earlier teardown and silent-skip findings, but the required paired Vulkan run does not yet compare this head with current main on the same machine and GPU.

What I ran

Reviewed head eddcd8f4a6007bdd59b0d57dfb6980db811a88e7 against PR base bff0289787c98570491c8f175179c8a5651c8017; its preview against current main b8f0a6b2025605b78eb70646bda79f458a577c82 was clean. Environment: Debian Linux x86-64, Python 3.11.2. I did not build or run C++/Vulkan tests locally.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 10472
python3 /root/.codex/skills/anyps5-pr-review/scripts/pr_snapshot.py 10472 --repo boykopovar/AnyPS5
gh pr checks 10472 -R boykopovar/AnyPS5

I also inspected the new exact-head test coverage and skip handling, the added cache-eviction/dedicated-allocation debt, and the test reports posted on the PR.

Results

Check Result
Diff/whitespace and conventions/template Passed in the no-build precheck.
Current-main merge preview Passed; clean against b8f0a6b2025605b78eb70646bda79f458a577c82.
Coverage-unavailable path Source inspection confirms the test returns CTest skip code 77 only after device teardown checks, and the wrapper distinguishes unavailable sharing from an unavailable Vulkan device.
Prior test-coverage findings Resolved: tests now report skipped sharing coverage instead of passing silently; the debt entry documents whole-block eviction behavior and unmeasured cost.
Exact-head runtime evidence Author/participant reports: 8 focused tests 24/24 on RX 9070 XT at exact head; on RTX 3070, 10 image-memory tests 3/3 with VVL 1.4.341, plus no-layer and VVL 1.3.275 runs; 133 touched-binary tests 3/3 on lavapipe with no VUIDs. The RTX/lavapipe run was on the head merged with main 0835ec8bdc, not a paired comparison with current main. These are supplied results, not runs I reproduced.
Current-main paired GPU comparison Not supplied for current main b8f0a6b2025605b78eb70646bda79f458a577c82 and this head on the same machine/GPU. The PR body’s earlier paired matrix used main db6af9e0fd and PR head 13829a4bb9.
ABI/test-quality helpers The precheck’s isolated checkout lacks the workspace-only helper scripts; this diff does not change exported ABI. I manually inspected the new test assertions and registration path.
Local build/tests Not run; the initial review is no-build.

Negative control

Assertion Change tested Outcome
Host-pointer imports are excluded from the image-allocation ledger Participant reports removing && !ImportsHostPointer(info) The teardown regression returned on RTX 3070; not independently run.
Sharing/pressure tests detect disabled suballocation Earlier PR evidence reports the controls failing on the tested devices Not independently rerun on this head.

Findings

Blocking

This changes AGC image allocation behavior, so repository guidance requires the same focused Vulkan tests on main and the change, from the same machine and GPU, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation; the logs must confirm the layer loaded and show no new VUID- errors. The current-head participant runs are useful, but there is no corresponding run on current main b8f0a6b2025605b78eb70646bda79f458a577c82. The older paired matrix does not cover the later allocator, depth-image integration, and teardown changes. Please provide that current-base pair and update ### Tested with the exact base/head commits and raw log or artifact links.

Non-blocking

None found in the source review. The earlier silent-skip and cache-eviction documentation findings are addressed in this head.

Sources

Not verified

I did not reproduce the author/participant GPU tests, run a build, or test on a physical PS5. Hosted product Linux and specialized GPU jobs are skipped for this PR; hosted Windows passed, but it does not replace the missing same-device current-main comparison.

To get this to a good state

Run the prescribed focused Vulkan tests on current main and this exact head on the same machine/GPU, confirm the layer marker and compare VUIDs, then update the ### Tested evidence. I will re-check the exact new head and rerun the same no-build checks.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5722635696 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10472#pullrequestreview-5722635696). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T12:03:47Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, current-main GPU comparison still needed The new head resolves the earlier teardown and silent-skip findings, but the required paired Vulkan run does not yet compare this head with current `main` on the same machine and GPU. ## What I ran Reviewed head `eddcd8f4a6007bdd59b0d57dfb6980db811a88e7` against PR base `bff0289787c98570491c8f175179c8a5651c8017`; its preview against current `main` `b8f0a6b2025605b78eb70646bda79f458a577c82` was clean. Environment: Debian Linux x86-64, Python 3.11.2. I did not build or run C++/Vulkan tests locally. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 10472 python3 /root/.codex/skills/anyps5-pr-review/scripts/pr_snapshot.py 10472 --repo boykopovar/AnyPS5 gh pr checks 10472 -R boykopovar/AnyPS5 ``` I also inspected the new exact-head test coverage and skip handling, the added cache-eviction/dedicated-allocation debt, and the test reports posted on the PR. ## Results | Check | Result | |---|---| | Diff/whitespace and conventions/template | Passed in the no-build precheck. | | Current-main merge preview | Passed; clean against `b8f0a6b2025605b78eb70646bda79f458a577c82`. | | Coverage-unavailable path | Source inspection confirms the test returns CTest skip code 77 only after device teardown checks, and the wrapper distinguishes unavailable sharing from an unavailable Vulkan device. | | Prior test-coverage findings | Resolved: tests now report skipped sharing coverage instead of passing silently; the debt entry documents whole-block eviction behavior and unmeasured cost. | | Exact-head runtime evidence | Author/participant reports: 8 focused tests 24/24 on RX 9070 XT at exact head; on RTX 3070, 10 image-memory tests 3/3 with VVL 1.4.341, plus no-layer and VVL 1.3.275 runs; 133 touched-binary tests 3/3 on lavapipe with no VUIDs. The RTX/lavapipe run was on the head merged with main `0835ec8bdc`, not a paired comparison with current main. These are supplied results, not runs I reproduced. | | Current-main paired GPU comparison | Not supplied for current main `b8f0a6b2025605b78eb70646bda79f458a577c82` and this head on the same machine/GPU. The PR body’s earlier paired matrix used main `db6af9e0fd` and PR head `13829a4bb9`. | | ABI/test-quality helpers | The precheck’s isolated checkout lacks the workspace-only helper scripts; this diff does not change exported ABI. I manually inspected the new test assertions and registration path. | | Local build/tests | Not run; the initial review is no-build. | ## Negative control | Assertion | Change tested | Outcome | |---|---|---| | Host-pointer imports are excluded from the image-allocation ledger | Participant reports removing `&& !ImportsHostPointer(info)` | The teardown regression returned on RTX 3070; not independently run. | | Sharing/pressure tests detect disabled suballocation | Earlier PR evidence reports the controls failing on the tested devices | Not independently rerun on this head. | ## Findings ### Blocking This changes AGC image allocation behavior, so repository guidance requires the same focused Vulkan tests on `main` and the change, from the same machine and GPU, with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`; the logs must confirm the layer loaded and show no new `VUID-` errors. The current-head participant runs are useful, but there is no corresponding run on current `main` `b8f0a6b2025605b78eb70646bda79f458a577c82`. The older paired matrix does not cover the later allocator, depth-image integration, and teardown changes. Please provide that current-base pair and update `### Tested` with the exact base/head commits and raw log or artifact links. ### Non-blocking None found in the source review. The earlier silent-skip and cache-eviction documentation findings are addressed in this head. ## Sources - [AGC paired Vulkan-test requirement at the reviewed base](https://github.com/boykopovar/AnyPS5/blob/bff0289787c98570491c8f175179c8a5651c8017/AGENTS.md#L15-L15) - [Exact-head coverage result and teardown verification](https://github.com/boykopovar/AnyPS5/blob/eddcd8f4a6007bdd59b0d57dfb6980db811a88e7/core/libs/prx/libSceAgcDriver/tests/execution/ImageMemory.cpp#L634-L693) - [Coverage skip wrapper](https://github.com/boykopovar/AnyPS5/blob/eddcd8f4a6007bdd59b0d57dfb6980db811a88e7/core/libs/prx/libSceAgcDriver/tests/execution/CheckImageMemorySkip.py#L5-L14) - [Documented image-allocation tradeoffs](https://github.com/boykopovar/AnyPS5/blob/eddcd8f4a6007bdd59b0d57dfb6980db811a88e7/docs/dev/debt/libSceAgcDriver.md#L162-L164) ## Not verified I did not reproduce the author/participant GPU tests, run a build, or test on a physical PS5. Hosted product Linux and specialized GPU jobs are skipped for this PR; hosted Windows passed, but it does not replace the missing same-device current-main comparison. ## To get this to a good state Run the prescribed focused Vulkan tests on current `main` and this exact head on the same machine/GPU, confirm the layer marker and compare VUIDs, then update the `### Tested` evidence. I will re-check the exact new head and rerun the same no-build checks.
MarcZX10 commented 2026-11-01 09:55:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T09:55:53Z.

Review: CHANGES_REQUESTED


Re-checked — new head, current-base evidence and overlap update needed

The new head adds accounting and skip-path regressions, but the paired GPU report uses an older main snapshot and an open overlapping PR still conflicts with this branch.

What I ran

Reviewed head 71ef22cc91c2b77542e70f54ce7b17530874152f; the PR base recorded by GitHub is 7c4dcf0ad84de7a473ce97bb21644c614f1c3bd3. Current main is 26fa1212b82f76dd49cf12d65e445d6ff3e0844c. A merge preview of the exact PR head onto current main was clean. The local environment was Linux x86-64, Python 3.11.2, GCC 12.2.0; I did not build or compile AnyPS5 locally.

Commands and checks:

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 10472 --output-dir /tmp/anyps5-pr-precheck-10472
git diff --check 7c4dcf0ad84de7a473ce97bb21644c614f1c3bd3...71ef22cc91c2b77542e70f54ce7b17530874152f
python3 tools/check_conventions.py --base 7c4dcf0ad84de7a473ce97bb21644c614f1c3bd3 --head 71ef22cc91c2b77542e70f54ce7b17530874152f --title 'feat(agc): suballocate sampled and storage image memory' --body /tmp/anyps5-pr-precheck-10472/pr-body.md
git worktree add --detach /tmp/anyps5-review-10472-71ef-session-20261101 71ef22cc91c2b77542e70f54ce7b17530874152f
PYTHONPYCACHEPREFIX=/tmp/anyps5-review-10472-pycache-20261101 python3 -m py_compile /tmp/anyps5-review-10472-71ef-session-20261101/core/libs/prx/libSceAgcDriver/tests/execution/CheckImageMemorySkip.py
python3 tools/pr_test_quality.py --root /tmp/anyps5-review-10472-71ef-session-20261101 core/libs/prx/libSceAgcDriver/tests/ImageMemory.cpp core/libs/prx/libSceAgcDriver/tests/execution/ImageMemory.cpp core/libs/prx/libSceAgcDriver/tests/execution/CheckImageMemorySkip.py core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_memory_tests.cmake core/libs/prx/libSceAgcDriver/tests/cmake/agc_image_memory_tests.cmake --json
python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base 7c4dcf0ad84de7a473ce97bb21644c614f1c3bd3 --head 71ef22cc91c2b77542e70f54ce7b17530874152f --json
git merge-tree --write-tree 26fa1212b82f76dd49cf12d65e445d6ff3e0844c 71ef22cc91c2b77542e70f54ce7b17530874152f
git merge-tree --write-tree a4261716f85826c149a80b7387e652c0a68e4bea 71ef22cc91c2b77542e70f54ce7b17530874152f
git merge-tree --write-tree a3fc34a47719e664df1c47f9609408803d38c330 71ef22cc91c2b77542e70f54ce7b17530874152f

The precheck verified head and base stayed unchanged. Its ABI and test-quality helpers were not present in the PR snapshot, so I ran the available workspace copies against these exact SHAs and manually checked their findings. The CMake registration uses an execution-source glob plus explicit CTest fragments.

Results

Check Result
Diff / whitespace Passed; exit 0, no diagnostics.
Conventions and PR template Passed.
Python syntax Passed for CheckImageMemorySkip.py at the exact head.
ABI audit Not applicable; no changed exported declarations or aliases were found.
Test-quality heuristic Two possible-unregistered warnings; both are false positives: tests/ImageMemory.cpp is listed in agc_image_memory_tests.cmake, while tests/execution/ImageMemory.cpp is discovered by the AGC execution-source glob.
Current-main merge preview Clean for head 71ef22c onto main 26fa121.
Pairwise overlap preview #7085 conflicts in Texture.hpp and Texture.cpp; #9875 merges cleanly with this head. #7085 is still open; #8419 and #9626 named in the PR's audit are closed.
Hosted checks on 71ef22c Windows, conventions, eligibility, report, labels and library-portability passed. Linux, relinker, ASan, register-context and write-watch were skipped.
NVIDIA report supplied in the PR Reports a successful build and 2,485 passed, 4 failed (0 new against its baseline), and 44 skipped on exact head 71ef22c; it compares against main 3741ca9, not current main 26fa121.
Unedited local check output

Conventions:

All conventions checks passed.

Python syntax command wrapper:

py_compile_exit=0

ABI audit:

{
  "status": "not_applicable",
  "symbols": [],
  "findings": [],
  "limitations": [
    "No changed APS5_VABI declaration/definition or APS5_EXPORT alias was recognized in the PR diff."
  ]
}

Test-quality heuristic (warnings manually checked against the CMake source list and registrations):

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

Current-main merge preview:

d250448865ea09070adc84f344d2d863ad225e99

Pairwise #7085 preview:

a810910122ad1956714ad83a9072b7a6648cb1b8
100644 6baa15aab695c9ece0aab4e2dda14563e297cadb 1	core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
100644 49fee90ae7115d3100d3d93d94d599b0b49e2633 2	core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
100644 91f80eb9e0a34c5aadb03d0fd8fe3499623eb5c1 3	core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
100644 ce2d871ed5f05d8c215ed86204b72e8e004cfd4a 1	core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
100644 652ceda8d1ee961146a1490d9a1ce159de092542 2	core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
100644 fe2cd4bbfea82a9d3caf7ba9285775f1abaeb772 3	core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp

Auto-merging core/libs/prx/libSceAgcDriver/CMakeLists.txt
Auto-merging core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
CONFLICT (content): Merge conflict in core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
Auto-merging core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
Auto-merging core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
CONFLICT (content): Merge conflict in core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
Auto-merging core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
Auto-merging core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
Auto-merging docs/dev/debt/libSceAgcDriver.md
Auto-merging docs/dev/debt/shader.md

Pairwise #9875 preview:

8a8d29e10bd8119d3fc2d266c7936502faf130d2

The precheck isolated-snapshot helper stderr:

/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck-10472/head-71ef22cc91c2-1ac7d74d/tools/pr_abi_audit.py': [Errno 2] No such file or directory
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck-10472/head-71ef22cc91c2-1ac7d74d/tools/pr_test_quality.py': [Errno 2] No such file or directory

Negative control

Assertion Change to the code under test Did the new test fail?
The new skip, allocation-accounting and host-import tracking assertions No local mutation was made; the exact-head test binaries were not built locally. Not exercised locally.

Findings

Blocking

  • Refresh the AGC comparison against current main. The new NVIDIA report is useful and covers the exact PR head, but its paired baseline is 3741ca9327246d0df81638726a986cef862b6db5; current main is 26fa1212b82f76dd49cf12d65e445d6ff3e0844c. Commits after the report's baseline changed files also touched by this PR, so the report does not establish the required current-main comparison. Please rerun the same focused Vulkan tests on current main and this head, on the same machine and GPU, with the required validation environment, and update the evidence.
  • Resolve the live #7085 overlap order. A merge preview of current #7085 head a4261716f85826c149a80b7387e652c0a68e4bea with this head reports conflicts in Texture.hpp and Texture.cpp. The PR body says the order is not agreed and its checklist says Depends on: none. Please coordinate which PR lands first with #7085's author, update the overlap audit to reflect current open/closed PRs, and declare the agreed order in the applicable Depends on checklist.

Non-blocking

  • The revised tests now detect unavailable sharing/pressure coverage after teardown and add allocation-accounting checks. The exact-head NVIDIA report lists the new image-memory tests as validated; I found no additional source-level blocker in this update.

Sources

Not verified

  • I did not build or run CTest locally. The NVIDIA build/test results are reported by the linked automation and were not run by me.
  • No Linux GPU, Windows GPU, physical console, or title run was performed locally. The PR's current hosted Linux and specialized jobs were skipped.
  • No local negative-control mutation was run; doing so requires the compiled exact-head test executable.

To get this to a good state

Please refresh the paired Vulkan evidence against current main, coordinate and declare the #7085 landing order, and update the stale overlap/test summary. I will rerun the same no-build checks and re-evaluate the new exact head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5727502379 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10472#pullrequestreview-5727502379). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T09:55:53Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, current-base evidence and overlap update needed The new head adds accounting and skip-path regressions, but the paired GPU report uses an older `main` snapshot and an open overlapping PR still conflicts with this branch. ## What I ran Reviewed head `71ef22cc91c2b77542e70f54ce7b17530874152f`; the PR base recorded by GitHub is `7c4dcf0ad84de7a473ce97bb21644c614f1c3bd3`. Current `main` is `26fa1212b82f76dd49cf12d65e445d6ff3e0844c`. A merge preview of the exact PR head onto current `main` was clean. The local environment was Linux x86-64, Python 3.11.2, GCC 12.2.0; I did not build or compile AnyPS5 locally. Commands and checks: ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 10472 --output-dir /tmp/anyps5-pr-precheck-10472 git diff --check 7c4dcf0ad84de7a473ce97bb21644c614f1c3bd3...71ef22cc91c2b77542e70f54ce7b17530874152f python3 tools/check_conventions.py --base 7c4dcf0ad84de7a473ce97bb21644c614f1c3bd3 --head 71ef22cc91c2b77542e70f54ce7b17530874152f --title 'feat(agc): suballocate sampled and storage image memory' --body /tmp/anyps5-pr-precheck-10472/pr-body.md git worktree add --detach /tmp/anyps5-review-10472-71ef-session-20261101 71ef22cc91c2b77542e70f54ce7b17530874152f PYTHONPYCACHEPREFIX=/tmp/anyps5-review-10472-pycache-20261101 python3 -m py_compile /tmp/anyps5-review-10472-71ef-session-20261101/core/libs/prx/libSceAgcDriver/tests/execution/CheckImageMemorySkip.py python3 tools/pr_test_quality.py --root /tmp/anyps5-review-10472-71ef-session-20261101 core/libs/prx/libSceAgcDriver/tests/ImageMemory.cpp core/libs/prx/libSceAgcDriver/tests/execution/ImageMemory.cpp core/libs/prx/libSceAgcDriver/tests/execution/CheckImageMemorySkip.py core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_memory_tests.cmake core/libs/prx/libSceAgcDriver/tests/cmake/agc_image_memory_tests.cmake --json python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base 7c4dcf0ad84de7a473ce97bb21644c614f1c3bd3 --head 71ef22cc91c2b77542e70f54ce7b17530874152f --json git merge-tree --write-tree 26fa1212b82f76dd49cf12d65e445d6ff3e0844c 71ef22cc91c2b77542e70f54ce7b17530874152f git merge-tree --write-tree a4261716f85826c149a80b7387e652c0a68e4bea 71ef22cc91c2b77542e70f54ce7b17530874152f git merge-tree --write-tree a3fc34a47719e664df1c47f9609408803d38c330 71ef22cc91c2b77542e70f54ce7b17530874152f ``` The precheck verified head and base stayed unchanged. Its ABI and test-quality helpers were not present in the PR snapshot, so I ran the available workspace copies against these exact SHAs and manually checked their findings. The CMake registration uses an execution-source glob plus explicit CTest fragments. ## Results | Check | Result | |---|---| | Diff / whitespace | Passed; exit 0, no diagnostics. | | Conventions and PR template | Passed. | | Python syntax | Passed for `CheckImageMemorySkip.py` at the exact head. | | ABI audit | Not applicable; no changed exported declarations or aliases were found. | | Test-quality heuristic | Two possible-unregistered warnings; both are false positives: `tests/ImageMemory.cpp` is listed in `agc_image_memory_tests.cmake`, while `tests/execution/ImageMemory.cpp` is discovered by the AGC execution-source glob. | | Current-main merge preview | Clean for head `71ef22c` onto `main` `26fa121`. | | Pairwise overlap preview | #7085 conflicts in `Texture.hpp` and `Texture.cpp`; #9875 merges cleanly with this head. #7085 is still open; #8419 and #9626 named in the PR's audit are closed. | | Hosted checks on `71ef22c` | Windows, conventions, eligibility, report, labels and library-portability passed. Linux, relinker, ASan, register-context and write-watch were skipped. | | NVIDIA report supplied in the PR | Reports a successful build and 2,485 passed, 4 failed (0 new against its baseline), and 44 skipped on exact head `71ef22c`; it compares against `main` `3741ca9`, not current `main` `26fa121`. | <details><summary>Unedited local check output</summary> Conventions: ```text All conventions checks passed. ``` Python syntax command wrapper: ```text py_compile_exit=0 ``` ABI audit: ```json { "status": "not_applicable", "symbols": [], "findings": [], "limitations": [ "No changed APS5_VABI declaration/definition or APS5_EXPORT alias was recognized in the PR diff." ] } ``` Test-quality heuristic (warnings manually checked against the CMake source list and registrations): ```json { "findings": [ { "path": "core/libs/prx/libSceAgcDriver/tests/ImageMemory.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." }, { "path": "core/libs/prx/libSceAgcDriver/tests/execution/ImageMemory.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." ] } ``` Current-main merge preview: ```text d250448865ea09070adc84f344d2d863ad225e99 ``` Pairwise #7085 preview: ```text a810910122ad1956714ad83a9072b7a6648cb1b8 100644 6baa15aab695c9ece0aab4e2dda14563e297cadb 1 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp 100644 49fee90ae7115d3100d3d93d94d599b0b49e2633 2 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp 100644 91f80eb9e0a34c5aadb03d0fd8fe3499623eb5c1 3 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp 100644 ce2d871ed5f05d8c215ed86204b72e8e004cfd4a 1 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp 100644 652ceda8d1ee961146a1490d9a1ce159de092542 2 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp 100644 fe2cd4bbfea82a9d3caf7ba9285775f1abaeb772 3 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp Auto-merging core/libs/prx/libSceAgcDriver/CMakeLists.txt Auto-merging core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp CONFLICT (content): Merge conflict in core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp Auto-merging core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp Auto-merging core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp CONFLICT (content): Merge conflict in core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp Auto-merging core/libs/prx/libSceAgcDriver/tests/Graphics.cpp Auto-merging core/libs/prx/libSceAgcDriver/tests/Recorder.cpp Auto-merging docs/dev/debt/libSceAgcDriver.md Auto-merging docs/dev/debt/shader.md ``` Pairwise #9875 preview: ```text 8a8d29e10bd8119d3fc2d266c7936502faf130d2 ``` The precheck isolated-snapshot helper stderr: ```text /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck-10472/head-71ef22cc91c2-1ac7d74d/tools/pr_abi_audit.py': [Errno 2] No such file or directory /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck-10472/head-71ef22cc91c2-1ac7d74d/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` </details> ## Negative control | Assertion | Change to the code under test | Did the new test fail? | |---|---|---| | The new skip, allocation-accounting and host-import tracking assertions | No local mutation was made; the exact-head test binaries were not built locally. | Not exercised locally. | ## Findings ### Blocking - **Refresh the AGC comparison against current `main`.** The new NVIDIA report is useful and covers the exact PR head, but its paired baseline is `3741ca9327246d0df81638726a986cef862b6db5`; current `main` is `26fa1212b82f76dd49cf12d65e445d6ff3e0844c`. Commits after the report's baseline changed files also touched by this PR, so the report does not establish the required current-main comparison. Please rerun the same focused Vulkan tests on current `main` and this head, on the same machine and GPU, with the required validation environment, and update the evidence. - **Resolve the live #7085 overlap order.** A merge preview of current #7085 head `a4261716f85826c149a80b7387e652c0a68e4bea` with this head reports conflicts in `Texture.hpp` and `Texture.cpp`. The PR body says the order is not agreed and its checklist says `Depends on: none`. Please coordinate which PR lands first with #7085's author, update the overlap audit to reflect current open/closed PRs, and declare the agreed order in the applicable `Depends on` checklist. ### Non-blocking - The revised tests now detect unavailable sharing/pressure coverage after teardown and add allocation-accounting checks. The exact-head NVIDIA report lists the new image-memory tests as validated; I found no additional source-level blocker in this update. ## Sources - [Contribution rules at `26fa121`](https://github.com/boykopovar/AnyPS5/blob/26fa1212b82f76dd49cf12d65e445d6ff3e0844c/CONTRIBUTING.md#L65-L73) require overlap order/dependency declarations and paired AGC validation runs. - [Current PR test changes at `71ef22c`](https://github.com/boykopovar/AnyPS5/blob/71ef22cc91c2b77542e70f54ce7b17530874152f/core/libs/prx/libSceAgcDriver/tests/execution/ImageMemory.cpp#L640-L680) and [test registration](https://github.com/boykopovar/AnyPS5/blob/71ef22cc91c2b77542e70f54ce7b17530874152f/core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_memory_tests.cmake#L1-L44). - [Execution test source discovery at `71ef22c`](https://github.com/boykopovar/AnyPS5/blob/71ef22cc91c2b77542e70f54ce7b17530874152f/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L546-L551). - [Exact-head NVIDIA report](https://github.com/boykopovar/AnyPS5/pull/10472#issuecomment-6555973636) and [attached run logs](https://gist.github.com/TechLevelZero/79717b1681002172cba487af35ea18cf). - [Open #7085 head](https://github.com/boykopovar/AnyPS5/tree/a4261716f85826c149a80b7387e652c0a68e4bea/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp). ## Not verified - I did not build or run CTest locally. The NVIDIA build/test results are reported by the linked automation and were not run by me. - No Linux GPU, Windows GPU, physical console, or title run was performed locally. The PR's current hosted Linux and specialized jobs were skipped. - No local negative-control mutation was run; doing so requires the compiled exact-head test executable. ## To get this to a good state Please refresh the paired Vulkan evidence against current `main`, coordinate and declare the #7085 landing order, and update the stale overlap/test summary. I will rerun the same no-build checks and re-evaluate the new exact head.
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!10472
No description provided.