fix(agc): import a native multisample D32S8 target whose stencil plane the guest stored its clear value into #13023

Merged
JAB-dev merged 11 commits from upstream-pr/13023 into main 2026-11-09 01:46:47 +00:00
JAB-dev commented 2026-10-29 22:03:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JAB-dev on 2026-10-29T22:03:32Z.


What

Arcade Game Zone (PPSA19015) can be refused at the native multisample D32S8 import with guest writes raced native multisample depth import although the separate stencil plane still holds its clear value: the guest stores the clear value over the plane while the host takes the plane, the write tracker sees a store, and the import gives up. The plane is now excluded from the write-generation check and proven by its content instead, read again after a fresh collect. A store of the clear value over the plane imports; a store of any other value is still refused with the same message. A guest that keeps storing the clear value after the import still throws at its next sample, as before.

Tested

Windows 11, NVIDIA RTX 4070 SUPER, driver 610.88.

  • agc_driver_native_depth_separate_stencil: new cases at 2, 4 and 8 samples store the clear value into the plane during the import (imports and samples), and one stores another value (refused). The same-value case fails without the change.
  • agc_driver_native_multisample_depth and the other agc_driver_native_depth_* tests, and check_conventions.py.
  • Validation layers: same VUID sets as the base (main with the open D32S8 import change) in all 37 focused tests (the VUIDs are VUID-VkDeviceCreateInfo-pNext-pNext, VUID-VkPhysicalDeviceProperties2-pNext-pNext, VUID-VkGraphicsPipelineCreateInfo-renderPass-06053 and VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605, all reported by the base), and no log reports was not found but was requested by env var VK_INSTANCE_LAYERS.
  • Arcade Game Zone: 27 minutes of play without a stop together with the publication change and the staged 4_4_4_4 partial write change.

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: #13021 (the test hook it adds); this branch contains it until it merges
  • Fixes: none
  • Unblocks: PPSA19015 https://github.com/boykopovar/AnyPS5/discussions/8562
  • GPUs tested: NVIDIA RTX 4070 SUPER, driver 610.88, Windows 11
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5076204236 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13023). Originally posted by [JAB-dev](https://github.com/JAB-dev) on 2026-10-29T22:03:32Z. --- ### What Arcade Game Zone (PPSA19015) can be refused at the native multisample D32S8 import with `guest writes raced native multisample depth import` although the separate stencil plane still holds its clear value: the guest stores the clear value over the plane while the host takes the plane, the write tracker sees a store, and the import gives up. The plane is now excluded from the write-generation check and proven by its content instead, read again after a fresh collect. A store of the clear value over the plane imports; a store of any other value is still refused with the same message. A guest that keeps storing the clear value after the import still throws at its next sample, as before. ### Tested Windows 11, NVIDIA RTX 4070 SUPER, driver 610.88. - `agc_driver_native_depth_separate_stencil`: new cases at 2, 4 and 8 samples store the clear value into the plane during the import (imports and samples), and one stores another value (refused). The same-value case fails without the change. - `agc_driver_native_multisample_depth` and the other `agc_driver_native_depth_*` tests, and `check_conventions.py`. - Validation layers: same VUID sets as the base (`main` with the open D32S8 import change) in all 37 focused tests (the VUIDs are `VUID-VkDeviceCreateInfo-pNext-pNext`, `VUID-VkPhysicalDeviceProperties2-pNext-pNext`, `VUID-VkGraphicsPipelineCreateInfo-renderPass-06053` and `VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605`, all reported by the base), and no log reports `was not found but was requested by env var VK_INSTANCE_LAYERS`. - Arcade Game Zone: 27 minutes of play without a stop together with the publication change and the staged 4_4_4_4 partial write change. ### 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: #13021 (the test hook it adds); this branch contains it until it merges <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: PPSA19015 https://github.com/boykopovar/AnyPS5/discussions/8562 <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: NVIDIA RTX 4070 SUPER, driver 610.88, Windows 11 <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no --> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jotitadev commented 2026-10-30 23:56:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-30T23:56:03Z.

Review: COMMENTED


Linux run of head 93673d8da5, with a negative control for the new same-value case.

Setup: Ubuntu 26.04, GCC 15.2, Release. RTX 3070 (NVIDIA 595.99.02) and lavapipe (Mesa 26.0.3), one at a time via VK_DRIVER_FILES. Khronos validation layer 1.4.341, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, ctest -j1. The head merged --no-ff onto current main de96e3efbd with no conflicts.

  • Negative control. I took #13021's head (this PR's base) and added only 790e422437's test changes, its StencilPlaneRead enum value and the one hook line, with none of the import change. agc_driver_native_depth_separate_stencil then fails on both devices with guest writes raced native multisample depth import. So the new case does catch the refusal this PR removes.
  • This head, focused set, 15 tests: agc_driver_native_multisample_depth, the agc_driver_native_depth_* tests, multisample_retirement, depth_plane_fill and depth_surface_from_storage. 15/15 in 3 of 3 runs on each device, 0 VUID- lines.
  • agc_driver_native_depth_driver_queued_fill runs its HTILE check here instead of skipping. On the RTX 3070 it checks 6 of 6 cases; on lavapipe it checks 4, and the 2-sample cases are unavailable.
  • With the older layer the NVIDIA CI uses (1.3.275), the focused set also passes on the RTX 3070. That layer reports VkDeviceCreateInfo-pNext-pNext and vkCmdCopyImage-srcImage-01548/01551, which the CI already lists for main.
  • Full ^agc suite (without display/flip/lds_atomics64, no layer, --timeout 60): 1136/1136 on the RTX 3070 and 1136/1136 on lavapipe.
  • ninja all plus every agc*_tests target builds. GCC prints no warnings on the lines this PR adds.

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

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

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5719935263 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13023#pullrequestreview-5719935263). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-30T23:56:03Z. **Review:** COMMENTED --- Linux run of head `93673d8da5`, with a negative control for the new same-value case. Setup: Ubuntu 26.04, GCC 15.2, Release. RTX 3070 (NVIDIA 595.99.02) and lavapipe (Mesa 26.0.3), one at a time via `VK_DRIVER_FILES`. Khronos validation layer 1.4.341, `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`, `ctest -j1`. The head merged `--no-ff` onto current `main` `de96e3efbd` with no conflicts. - **Negative control.** I took #13021's head (this PR's base) and added only 790e422437's test changes, its `StencilPlaneRead` enum value and the one hook line, with none of the import change. `agc_driver_native_depth_separate_stencil` then fails on both devices with `guest writes raced native multisample depth import`. So the new case does catch the refusal this PR removes. - **This head, focused set, 15 tests:** `agc_driver_native_multisample_depth`, the `agc_driver_native_depth_*` tests, `multisample_retirement`, `depth_plane_fill` and `depth_surface_from_storage`. 15/15 in 3 of 3 runs on each device, 0 `VUID-` lines. - `agc_driver_native_depth_driver_queued_fill` runs its HTILE check here instead of skipping. On the RTX 3070 it checks 6 of 6 cases; on lavapipe it checks 4, and the 2-sample cases are unavailable. - With the older layer the NVIDIA CI uses (1.3.275), the focused set also passes on the RTX 3070. That layer reports `VkDeviceCreateInfo-pNext-pNext` and `vkCmdCopyImage-srcImage-01548/01551`, which the CI already lists for `main`. - **Full `^agc` suite** (without display/flip/`lds_atomics64`, no layer, `--timeout 60`): 1136/1136 on the RTX 3070 and 1136/1136 on lavapipe. - `ninja all` plus every `agc*_tests` target builds. GCC prints no warnings on the lines this PR adds. GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02, Linux); lavapipe (Mesa 26.0.3, Linux). Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
CnRJay commented 2026-11-01 19:50:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:50:44Z.

Review: COMMENTED


Neutral flag: this branch is #13021's branch plus one commit (fix(agc): import a native multisample D32S8 target whose stencil plane...); the other ~40 commits, including the origin/pr-9533 merge, are shared with #13021 and with the prerequisite series. Only the stencil-plane-clear fix is new here. Please mark which of the two should merge first and state it under Depends on, or reduce this PR to its own commit so the diff (+2398/-172) is the topic.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729926557 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13023#pullrequestreview-5729926557). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-11-01T19:50:44Z. **Review:** COMMENTED --- Neutral flag: this branch is #13021's branch plus one commit (`fix(agc): import a native multisample D32S8 target whose stencil plane...`); the other ~40 commits, including the `origin/pr-9533` merge, are shared with #13021 and with the prerequisite series. Only the stencil-plane-clear fix is new here. Please mark which of the two should merge first and state it under `Depends on`, or reduce this PR to its own commit so the diff (+2398/-172) is the topic.
XairRrR commented 2026-11-02 21:37:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T21:37:44Z.

Review: APPROVED


Reviewed — approved

The PR's own change (790e422437) proves the separate stencil plane by its content after a fresh collect, instead of by its write generation. It is sound, the focused tests pass, and the new same-value case fails when the old check is put back.

What I ran

Head 474d5989695cd1ca836b90923e0d78d3bf299d85, merged --no-ff onto main 9090972b7e91fd266819cbd77a8b058e177b5682. The merge was clean. The build tree was Release, GCC 14.2.0, Ninja, BUILD_TESTING=ON. The machine is Debian 13 (VM, 32 vCPU Xeon Gold 6136), with Vulkan through lavapipe (Mesa 26.1.6, LLVM 19) and no GPU.

git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...474d5989695cd1ca836b90923e0d78d3bf299d85
python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "agc_driver_native_(depth|multisample)|agc_driver_multisample_retirement|agc_driver_depth_plane_fill|agc_driver_depth_surface_from_storage"
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -V -R "^agc_driver_native_depth_separate_stencil$"
# negative control (see below)
ninja -C build -j32 -l32 agc_driver_native_multisample_depth_tests
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build --output-on-failure -R "^agc_driver_native_depth_separate_stencil$"
# restore merged DepthSurface.cpp, rebuild, rerun
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -R "^agc_driver_native_depth_(separate_stencil|publication)$"
git status --porcelain

Results

Check Result
git diff --check clean
check_conventions.py 0 errors, 1 warning that was already there (see Non-blocking)
Configure / build / libs (script) passed
Selected tests (script): 2099 ran 0 new failures, 0 timeouts; the 7 known failures (agc_driver_division, the denormal-mode tests, unwrap_self, vector_constant_factor_tininess) also fail on main
Validation-layer comparison (script): 757 tests layer loaded in 756, missing in none; 0 tests with new VUID- lines
Focused native-depth set: 17 tests 16 passed, 1 skipped (agc_driver_native_depth_bda_clear, a device limitation), all under 3 s each
agc_driver_native_depth_separate_stencil passed, 1.8 s, checked=42 unavailable=21
agc_driver_native_depth_publication passed, 1.6 s
Worktree after restore git status --porcelain empty
separate_stencil output (merged tree)
Native depth with a separate stencil plane stored the clear value again during import: imported; stored another value: refused
Native depth with a separate stencil plane cases checked=42 unavailable=21
1/1 Test #1675: agc_driver_native_depth_separate_stencil ...   Passed    1.80 sec

Negative control

main's production files cannot be restored as they are: the test needs the DepthPublicationStage::StencilPlaneRead hook, which this branch adds through #13021. So I put back only the import check from main. I replaced the block after the plane read with main's if (!GuestMemory::UnchangedSinceAll(state.initial)) return refuse("guest writes raced native multisample depth import");. The hook and the whole test source stayed the same. After a rebuild, agc_driver_native_depth_separate_stencil failed:

AGC graphics: guest writes raced native multisample depth import
0% tests passed, 1 tests failed out of 1

I then restored the merged DepthSurface.cpp and rebuilt. separate_stencil and publication passed again, and the worktree was back to the merged tree. This agrees with jotitadev's negative control and RNK123's one-expression mutation in the discussion. It is a third run of the same check, on lavapipe and GCC 14.

Findings

Blocking

None.

Non-blocking

  • The diff still carries #13021. Most of the +1009 lines are the publication change (WriteChangedIfHeld, UnchangedSinceLastCollect, PublishToGuest, the publication tests and the debt entry). This PR's own topic is the 15 lines in prepareDepthSampling (core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:221-241 in the merged tree) and the two new PlaneFault cases. CnRJay already raised this, and the author answered and declared Depends on: #13021. I mention it only so this PR is merged after #13021. I read the publication part only as far as it affects the import change; its full review belongs on #13021.
  • The import reads the stencil plane twice. It now reads the whole plane a second time after the extra collect. At 8 samples and a large extent, that is tens of MB copied again once per import. It is correct, and since it happens once per surface it is unlikely to matter. If it ever shows up in a profile, the first content check could be skipped when the second one runs.
  • The debt-length warning from check_conventions.py is on the "Native multisampled depth sampling" entry (docs/dev/debt/libSceAgcDriver.md:67). That entry is already far over 1000 characters on main, and this branch only shortens it, through #13021's commit. The warning is not from this PR.

Correctness of the change

  • The plane is removed from UnchangedSinceAll only when it was proven by content (provedPlane). Aliased or unproven planes keep the old generation check.
  • After that, the plane's generation is moved forward to a fresh CollectWritesUncached, and the plane is read again.
    • A store that lands before that collect is covered by the reread: a different value refuses with the same message, and the clear value is accepted.
    • A store that lands after the collect is stamped after the new generation, so the existing checks at the next sample catch it. This matches the description's "still throws at its next sample, as before".
  • The depth and HTILE ranges keep their original generations, so nothing changes for them.
  • The behaviour is general and not tied to one title. Nothing new silently succeeds: a different value still refuses.
  • Checklist lines are present: Depends on, Fixes, Unblocks PPSA19015 with its discussion, GPUs tested, and AI-assisted. The PR adds no code comments, and new tests finish well under 30 s.

Not verified

  • Only lavapipe here. separate_stencil reports 21 cases unavailable on this device, so the 2- and 8-sample same-value cases may not all have run on this machine. The discussion has reports that they run on an RTX 3070 (jotitadev) and an RX 9060 XT with RADV (RNK123).
  • No Windows run. I did not check the Windows path, where host imports are compared rather than write-watched.
  • No title run. I did not launch the title. The author's 27-minute Arcade Game Zone run also included two other changes that are not in this PR (the publication branch and a staged 4_4_4_4 partial-write change).
  • #13021's publication code got only a light read. I did not review it in depth.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5743727216 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13023#pullrequestreview-5743727216). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T21:37:44Z. **Review:** APPROVED --- # Reviewed — approved The PR's own change (`790e422437`) proves the separate stencil plane by its content after a fresh collect, instead of by its write generation. It is sound, the focused tests pass, and the new same-value case fails when the old check is put back. ## What I ran Head `474d5989695cd1ca836b90923e0d78d3bf299d85`, merged `--no-ff` onto `main` `9090972b7e91fd266819cbd77a8b058e177b5682`. The merge was clean. The build tree was Release, GCC 14.2.0, Ninja, `BUILD_TESTING=ON`. The machine is Debian 13 (VM, 32 vCPU Xeon Gold 6136), with Vulkan through lavapipe (Mesa 26.1.6, LLVM 19) and no GPU. ``` git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...474d5989695cd1ca836b90923e0d78d3bf299d85 python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "agc_driver_native_(depth|multisample)|agc_driver_multisample_retirement|agc_driver_depth_plane_fill|agc_driver_depth_surface_from_storage" ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -V -R "^agc_driver_native_depth_separate_stencil$" # negative control (see below) ninja -C build -j32 -l32 agc_driver_native_multisample_depth_tests ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build --output-on-failure -R "^agc_driver_native_depth_separate_stencil$" # restore merged DepthSurface.cpp, rebuild, rerun ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -R "^agc_driver_native_depth_(separate_stencil|publication)$" git status --porcelain ``` ## Results | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | 0 errors, 1 warning that was already there (see Non-blocking) | | Configure / build / `libs` (script) | passed | | Selected tests (script): 2099 ran | 0 new failures, 0 timeouts; the 7 known failures (`agc_driver_division`, the denormal-mode tests, `unwrap_self`, `vector_constant_factor_tininess`) also fail on `main` | | Validation-layer comparison (script): 757 tests | layer loaded in 756, missing in none; 0 tests with new `VUID-` lines | | Focused native-depth set: 17 tests | 16 passed, 1 skipped (`agc_driver_native_depth_bda_clear`, a device limitation), all under 3 s each | | `agc_driver_native_depth_separate_stencil` | passed, 1.8 s, `checked=42 unavailable=21` | | `agc_driver_native_depth_publication` | passed, 1.6 s | | Worktree after restore | `git status --porcelain` empty | <details><summary>separate_stencil output (merged tree)</summary> ``` Native depth with a separate stencil plane stored the clear value again during import: imported; stored another value: refused Native depth with a separate stencil plane cases checked=42 unavailable=21 1/1 Test #1675: agc_driver_native_depth_separate_stencil ... Passed 1.80 sec ``` </details> ## Negative control `main`'s production files cannot be restored as they are: the test needs the `DepthPublicationStage::StencilPlaneRead` hook, which this branch adds through #13021. So I put back only the import check from `main`. I replaced [the block after the plane read](https://github.com/boykopovar/AnyPS5/blob/474d5989695cd1ca836b90923e0d78d3bf299d85/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp#L226-L240) with `main`'s `if (!GuestMemory::UnchangedSinceAll(state.initial)) return refuse("guest writes raced native multisample depth import");`. The hook and the whole test source stayed the same. After a rebuild, `agc_driver_native_depth_separate_stencil` failed: ``` AGC graphics: guest writes raced native multisample depth import 0% tests passed, 1 tests failed out of 1 ``` I then restored the merged `DepthSurface.cpp` and rebuilt. `separate_stencil` and `publication` passed again, and the worktree was back to the merged tree. This agrees with jotitadev's negative control and RNK123's one-expression mutation in the discussion. It is a third run of the same check, on lavapipe and GCC 14. ## Findings ### Blocking None. ### Non-blocking - **The diff still carries #13021.** Most of the +1009 lines are the publication change (`WriteChangedIfHeld`, `UnchangedSinceLastCollect`, `PublishToGuest`, the publication tests and the debt entry). This PR's own topic is the 15 lines in `prepareDepthSampling` (`core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:221-241` in the merged tree) and the two new `PlaneFault` cases. CnRJay already raised this, and the author answered and declared `Depends on: #13021`. I mention it only so this PR is merged after #13021. I read the publication part only as far as it affects the import change; its full review belongs on #13021. - **The import reads the stencil plane twice.** It now reads the whole plane a second time after the extra collect. At 8 samples and a large extent, that is tens of MB copied again once per import. It is correct, and since it happens once per surface it is unlikely to matter. If it ever shows up in a profile, the first content check could be skipped when the second one runs. - **The `debt-length` warning from `check_conventions.py`** is on the "Native multisampled depth sampling" entry (`docs/dev/debt/libSceAgcDriver.md:67`). That entry is already far over 1000 characters on `main`, and this branch only shortens it, through #13021's commit. The warning is not from this PR. ### Correctness of the change - The plane is removed from `UnchangedSinceAll` only when it was proven by content (`provedPlane`). Aliased or unproven planes keep the old generation check. - After that, the plane's generation is moved forward to a fresh `CollectWritesUncached`, and the plane is read again. - A store that lands before that collect is covered by the reread: a different value refuses with the same message, and the clear value is accepted. - A store that lands after the collect is stamped after the new generation, so the existing checks at the next sample catch it. This matches the description's "still throws at its next sample, as before". - The depth and HTILE ranges keep their original generations, so nothing changes for them. - The behaviour is general and not tied to one title. Nothing new silently succeeds: a different value still refuses. - Checklist lines are present: Depends on, Fixes, Unblocks PPSA19015 with its discussion, GPUs tested, and AI-assisted. The PR adds no code comments, and new tests finish well under 30 s. ## Not verified - **Only lavapipe here.** `separate_stencil` reports 21 cases unavailable on this device, so the 2- and 8-sample same-value cases may not all have run on this machine. The discussion has reports that they run on an RTX 3070 (jotitadev) and an RX 9060 XT with RADV (RNK123). - **No Windows run.** I did not check the Windows path, where host imports are compared rather than write-watched. - **No title run.** I did not launch the title. The author's 27-minute Arcade Game Zone run also included two other changes that are not in this PR (the publication branch and a staged 4_4_4_4 partial-write change). - **#13021's publication code got only a light read.** I did not review it in depth. <!-- anyps5-bots job=1915 head=474d5989695cd1ca836b90923e0d78d3bf299d85 -->
XairRrR commented 2026-11-03 05:45:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T05:45:58Z.

Review: APPROVED


Re-checked — approved

Since my review of 474d598, the only changes are two merges of main: 456c2ef40b into the publication branch, which resolved a conflict in VulkanDevice.cpp, and f49ecfc3ba into this branch. The resolution is correct, and the focused tests still pass. The two new failures in the script's run also happen on main.

What changed since my last review

  • The PR's own commits are unchanged. The range-diff shows all six commits identical (0a3252876f … f6e7798ba9).
  • Merge 456c2ef40b resolved a conflict in core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp. main had added the scratch-pool lookup (ScratchPoolFor) in recordDispatch. The branch's resources.RequireGuestBuffers() now comes right after StoreDrawnLinearTouching, before the scratch-pool block.
  • No new author comments or replies to my review. The description and checklist are unchanged.

What I ran

Head f49ecfc3ba4ef68f14e2fba312267dde8921aba0, merged --no-ff onto main 5cb015caaaaf83f8ee431414ee6a457b5b307d49 (merged tree cf1f9afcfa321796927b3c32e6e4cd60da475eeb). Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6).

git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...f49ecfc3ba4ef68f14e2fba312267dde8921aba0
python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49
git show --cc 456c2ef40b64 -- core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 -R "agc_driver_native_(depth|multisample)|agc_driver_multisample_retirement|agc_driver_depth_plane_fill|agc_driver_depth_surface_from_storage"
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build --output-on-failure -R "^agc_driver_image_sample_lod_clamp_shader_lane$"
# put main's version back in the 9 production files the PR changes, then:
ninja -C build -j32 -l32 agc_driver_image_sample_lod_clamp_tests
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build --output-on-failure -R "^agc_driver_image_sample_lod_clamp_shader_lane$"
# restore the merged files, then:
ninja -C build -j32 -l32 agc_driver_image_sample_lod_clamp_tests agc_driver_native_multisample_depth_tests
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -R "^agc_driver_native_depth_(separate_stencil|publication)$"
git status --porcelain
Check Result
git diff --check clean
check_conventions.py 0 errors; the same debt-length warning as before, on docs/dev/debt/libSceAgcDriver.md:67 (already there on main)
Build / libs (script) passed
Selected tests (script): 2235 ran 2 new failures listed, both from main (see below); 0 timeouts
Validation comparison (script): 759 tests layer loaded in 758, missing in none, 0 tests with new VUID- lines
Focused native-depth set: 17 tests 16 passed, 1 skipped (agc_driver_native_depth_bda_clear, a device limitation)
separate_stencil and publication after the restore passed
Worktree after the restore git status --porcelain is empty

The two failures the script lists as new do not come from this PR:

  • agc_driver_image_sample_lod_clamp_shader_lane. This test was added on main by fe18496c95, after the script's baseline 096c455. With the PR's 9 production files restored from main and the target rebuilt, it still fails with the same thread 0 component 1 is 0.000000, expected 0.062500 message.
  • unwrap_self_UnwrapTest_test_new_output_inherits_the_destination_directory_group. This subtest is new on main too, from the unwrap test split (a8090ef04e). It fails on os.chown with EINVAL in this sandbox. The PR touches nothing in tools/.

Previous findings

  • The diff still carries #13021: Still open, non-blocking. The branch still contains the publication series. Merge #13021 first, as Depends on says.
  • The import reads the stencil plane twice: Still open, non-blocking. The code is unchanged (DepthSurface.cpp in prepareDepthSampling).
  • The debt-length warning: No longer applies as a finding against this PR. The warning is unchanged, and the entry was already over the limit on main.

New findings

Blocking

None.

Non-blocking

None. In the resolved recordDispatch, RequireGuestBuffers() still runs before recorder.Commands / OverlapCommands takes the command buffer, which is what 24869a37ea intends. The ScratchPoolFor block main added sits between the two and does not take a command buffer first.

Not verified

  • Negative control not rerun. The test sources and the import change are byte-identical to 474d598 (range-diff =), so the negative control from my previous review still applies.
  • Only lavapipe. No other GPUs, no Windows run and no title run. The NVIDIA and AMD runs in the discussion for this head report 0 new failures and no new validation IDs.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5747726350 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13023#pullrequestreview-5747726350). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T05:45:58Z. **Review:** APPROVED --- # Re-checked — approved Since my review of `474d598`, the only changes are two merges of `main`: `456c2ef40b` into the publication branch, which resolved a conflict in `VulkanDevice.cpp`, and `f49ecfc3ba` into this branch. The resolution is correct, and the focused tests still pass. The two new failures in the script's run also happen on `main`. ## What changed since my last review - The PR's own commits are unchanged. The range-diff shows all six commits identical (`0a3252876f` … `f6e7798ba9`). - Merge `456c2ef40b` resolved a conflict in `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`. `main` had added the scratch-pool lookup (`ScratchPoolFor`) in `recordDispatch`. The branch's `resources.RequireGuestBuffers()` now comes right after `StoreDrawnLinearTouching`, before the scratch-pool block. - No new author comments or replies to my review. The description and checklist are unchanged. ## What I ran Head `f49ecfc3ba4ef68f14e2fba312267dde8921aba0`, merged `--no-ff` onto `main` `5cb015caaaaf83f8ee431414ee6a457b5b307d49` (merged tree `cf1f9afcfa321796927b3c32e6e4cd60da475eeb`). Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6). ``` git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...f49ecfc3ba4ef68f14e2fba312267dde8921aba0 python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 git show --cc 456c2ef40b64 -- core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 -R "agc_driver_native_(depth|multisample)|agc_driver_multisample_retirement|agc_driver_depth_plane_fill|agc_driver_depth_surface_from_storage" ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build --output-on-failure -R "^agc_driver_image_sample_lod_clamp_shader_lane$" # put main's version back in the 9 production files the PR changes, then: ninja -C build -j32 -l32 agc_driver_image_sample_lod_clamp_tests ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build --output-on-failure -R "^agc_driver_image_sample_lod_clamp_shader_lane$" # restore the merged files, then: ninja -C build -j32 -l32 agc_driver_image_sample_lod_clamp_tests agc_driver_native_multisample_depth_tests ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -R "^agc_driver_native_depth_(separate_stencil|publication)$" git status --porcelain ``` | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | 0 errors; the same `debt-length` warning as before, on `docs/dev/debt/libSceAgcDriver.md:67` (already there on `main`) | | Build / `libs` (script) | passed | | Selected tests (script): 2235 ran | 2 new failures listed, both from `main` (see below); 0 timeouts | | Validation comparison (script): 759 tests | layer loaded in 758, missing in none, 0 tests with new `VUID-` lines | | Focused native-depth set: 17 tests | 16 passed, 1 skipped (`agc_driver_native_depth_bda_clear`, a device limitation) | | `separate_stencil` and `publication` after the restore | passed | | Worktree after the restore | `git status --porcelain` is empty | **The two failures the script lists as new do not come from this PR:** - **`agc_driver_image_sample_lod_clamp_shader_lane`.** This test was added on `main` by `fe18496c95`, after the script's baseline `096c455`. With the PR's 9 production files restored from `main` and the target rebuilt, it still fails with the same `thread 0 component 1 is 0.000000, expected 0.062500` message. - **`unwrap_self_UnwrapTest_test_new_output_inherits_the_destination_directory_group`.** This subtest is new on `main` too, from the unwrap test split (`a8090ef04e`). It fails on `os.chown` with `EINVAL` in this sandbox. The PR touches nothing in `tools/`. ## Previous findings - **The diff still carries #13021: Still open, non-blocking.** The branch still contains the publication series. Merge #13021 first, as `Depends on` says. - **The import reads the stencil plane twice: Still open, non-blocking.** The code is unchanged (`DepthSurface.cpp` in `prepareDepthSampling`). - **The `debt-length` warning: No longer applies** as a finding against this PR. The warning is unchanged, and the entry was already over the limit on `main`. ## New findings ### Blocking None. ### Non-blocking None. In the resolved `recordDispatch`, `RequireGuestBuffers()` still runs before `recorder.Commands` / `OverlapCommands` takes the command buffer, which is what `24869a37ea` intends. The `ScratchPoolFor` block `main` added sits between the two and does not take a command buffer first. ## Not verified - **Negative control not rerun.** The test sources and the import change are byte-identical to `474d598` (range-diff `=`), so the negative control from my previous review still applies. - **Only lavapipe.** No other GPUs, no Windows run and no title run. The NVIDIA and AMD runs in the discussion for this head report 0 new failures and no new validation IDs. <!-- anyps5-bots job=2893 head=f49ecfc3ba4ef68f14e2fba312267dde8921aba0 -->
XairRrR commented 2026-11-03 06:45:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T06:45:09Z.

Review: APPROVED


Re-checked — approved

Since my review of f49ecfc, the only change is a new merge of main. It resolves a conflict in Draw.cpp with main's stencil-write-intent depth view (merged into main in 66749882e0). The resolution keeps both sides correctly. The checks pass, and so do the focused tests, including the stencil-plane test that main added.

What changed since my last review

  • The PR's own commits are unchanged. delta.patch shows all six commits identical (0a3252876f … f6e7798ba9).
  • Merge 6e2b8263c2 (main d1ae628bc2 into the publication branch) resolved a conflict in core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp, in two places: prepareDraw and DrawWithRecipe.
    • What main changed: it replaced DepthSurfaceView(...) with DepthSurfaceViewWithStencilWriteIntent(..., writesStencilTarget(state)). Its NoteDepthSurfaceWrite call stayed right after the view.
    • What the branch already had: NoteDepthSurfaceWrite moved later, after resolveDrawResources in prepareDraw and after CheckBufferAliases in DrawWithRecipe.
    • The resolution: it takes main's new view call and keeps the branch's later NoteDepthSurfaceWrite placement, at Draw.cpp:3089 and Draw.cpp:3879. Neither side is lost, and the call is not duplicated.
    • writesDepthTarget already includes writesStencilTarget (Draw.cpp:398), so the moved call still notes stencil-only writes.
  • Merge 4767e11930 (the publication branch into this branch) carries only that main merge.
  • No new author comments or replies. The description and checklist are unchanged.

What I ran

Head 4767e11930a92af5cadcb224b61eef6ee22589ad, merged --no-ff onto main d1ae628bc2f62459cce1e9872ba5632c938c71f2 (merged tree 09053e576e99960cf70ef8fa883c4ab312eb7671). Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6).

git show --cc 6e2b8263c246 -- core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
git diff d1ae628bc2f62459cce1e9872ba5632c938c71f2 09053e576e99960cf70ef8fa883c4ab312eb7671 -- core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...4767e11930a92af5cadcb224b61eef6ee22589ad
python3 tools/check_conventions.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "agc_driver_native_(depth|multisample)|agc_driver_multisample_retirement|agc_driver_depth_plane_fill|agc_driver_depth_surface_from_storage|stencil_plane"
git status --porcelain
Check Result
git diff --check clean
check_conventions.py 0 errors. One debt-length warning on docs/dev/debt/libSceAgcDriver.md:67, already there on main
Build / libs (script) passed
Selected tests (script): 2199 ran 0 new failures, 0 timeouts. The 7 known failures also fail on main
Validation comparison (script): 767 tests layer loaded in 766 and missing in none; 0 tests with new VUID- lines
Focused set: 18 tests, including agc_driver_stencil_plane_memory from main 17 passed, 1 skipped (agc_driver_native_depth_bda_clear, a device limitation)
Worktree git status --porcelain is empty

Previous findings

  • The diff still carries #13021: Still open, non-blocking. The branch still contains the publication series. Merge #13021 first, as Depends on says.
  • The import reads the stencil plane twice: Still open, non-blocking. prepareDepthSampling in DepthSurface.cpp is unchanged.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • Negative control not rerun. The PR's commits are identical to the ones I reviewed before (range-diff =), and the merge changed no test of this PR. The earlier negative control still applies.
  • Only lavapipe. I made no run on another GPU, on Windows, or on a title. The NVIDIA and AMD CI runs in the discussion cover f49ecfc, not this head.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5748159055 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13023#pullrequestreview-5748159055). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T06:45:09Z. **Review:** APPROVED --- # Re-checked — approved Since my review of `f49ecfc`, the only change is a new merge of `main`. It resolves a conflict in `Draw.cpp` with `main`'s stencil-write-intent depth view (merged into `main` in `66749882e0`). The resolution keeps both sides correctly. The checks pass, and so do the focused tests, including the stencil-plane test that `main` added. ## What changed since my last review - **The PR's own commits are unchanged.** delta.patch shows all six commits identical (`0a3252876f` … `f6e7798ba9`). - **Merge `6e2b8263c2`** (`main` `d1ae628bc2` into the publication branch) resolved a conflict in `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`, in two places: `prepareDraw` and `DrawWithRecipe`. - **What `main` changed:** it replaced `DepthSurfaceView(...)` with `DepthSurfaceViewWithStencilWriteIntent(..., writesStencilTarget(state))`. Its `NoteDepthSurfaceWrite` call stayed right after the view. - **What the branch already had:** `NoteDepthSurfaceWrite` moved later, after `resolveDrawResources` in `prepareDraw` and after `CheckBufferAliases` in `DrawWithRecipe`. - **The resolution:** it takes `main`'s new view call and keeps the branch's later `NoteDepthSurfaceWrite` placement, at `Draw.cpp:3089` and `Draw.cpp:3879`. Neither side is lost, and the call is not duplicated. - `writesDepthTarget` already includes `writesStencilTarget` (`Draw.cpp:398`), so the moved call still notes stencil-only writes. - **Merge `4767e11930`** (the publication branch into this branch) carries only that `main` merge. - **No new author comments or replies.** The description and checklist are unchanged. ## What I ran Head `4767e11930a92af5cadcb224b61eef6ee22589ad`, merged `--no-ff` onto `main` `d1ae628bc2f62459cce1e9872ba5632c938c71f2` (merged tree `09053e576e99960cf70ef8fa883c4ab312eb7671`). Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6). ``` git show --cc 6e2b8263c246 -- core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp git diff d1ae628bc2f62459cce1e9872ba5632c938c71f2 09053e576e99960cf70ef8fa883c4ab312eb7671 -- core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...4767e11930a92af5cadcb224b61eef6ee22589ad python3 tools/check_conventions.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "agc_driver_native_(depth|multisample)|agc_driver_multisample_retirement|agc_driver_depth_plane_fill|agc_driver_depth_surface_from_storage|stencil_plane" git status --porcelain ``` | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | 0 errors. One `debt-length` warning on `docs/dev/debt/libSceAgcDriver.md:67`, already there on `main` | | Build / `libs` (script) | passed | | Selected tests (script): 2199 ran | 0 new failures, 0 timeouts. The 7 known failures also fail on `main` | | Validation comparison (script): 767 tests | layer loaded in 766 and missing in none; 0 tests with new `VUID-` lines | | Focused set: 18 tests, including `agc_driver_stencil_plane_memory` from `main` | 17 passed, 1 skipped (`agc_driver_native_depth_bda_clear`, a device limitation) | | Worktree | `git status --porcelain` is empty | ## Previous findings - **The diff still carries #13021: Still open, non-blocking.** The branch still contains the publication series. Merge #13021 first, as `Depends on` says. - **The import reads the stencil plane twice: Still open, non-blocking.** `prepareDepthSampling` in `DepthSurface.cpp` is unchanged. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - **Negative control not rerun.** The PR's commits are identical to the ones I reviewed before (range-diff `=`), and the merge changed no test of this PR. The earlier negative control still applies. - **Only lavapipe.** I made no run on another GPU, on Windows, or on a title. The NVIDIA and AMD CI runs in the discussion cover `f49ecfc`, not this head. <!-- anyps5-bots job=3145 head=4767e11930a92af5cadcb224b61eef6ee22589ad -->
XairRrR commented 2026-11-03 09:43:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T09:43:33Z.

Review: APPROVED


Re-checked — approved

Since 4767e11, the only change is a new merge of main. It resolves conflicts in GuestMemory.cpp and docs/dev/debt/libSceAgcDriver.md and keeps both sides in each. The checks and the focused tests pass. The one new VUID- the script reports comes from a test that main added, not from this PR.

What changed since my last review

  • The PR's own commits are unchanged. delta.patch shows all six commits identical (0a3252876f … f6e7798ba9).
  • Merge 0180bafe62 (main 4f41f4c375 into the publication branch) resolved two conflicts:
    • Execution/src/GuestMemory.cpp: main added WriteChanged(..., byteStoreLimit) and WriteChangedKeepingGuest, both through writeChanged(..., keepGuest). The branch had added WriteChangedIfHeld. The resolution keeps all three, placed next to each other. All of the branch's other tracker changes are intact: cpuUnchanged, the walked parameter of rangeUnchanged, storeOwn(..., complete) and UnchangedSinceLastCollect. git diff 4f41f4c375 4e3f9208d2 on this file is exactly the branch's earlier change against d1ae628bc2. main's callers (GuestBufferMemory.cpp:6837, GuestBufferMemory.cpp:6846) and its test (tests/Pm4.cpp:895) still reach WriteChangedKeepingGuest.
    • Debt file: the branch's edited "Native multisampled depth clears" entry, its new "Native D32S8 guest publication" entry and its trimmed sampling entry are kept. main's new "Native multisampled D32S8 depth without HTILE" entry is kept at docs/dev/debt/libSceAgcDriver.md:70.
  • DepthSurface.cpp merged without conflicts with main's import of D32S8 targets without HTILE. I checked how that new owner interacts with publication:
    • Its sampling.initial holds two planes (DepthSurface.cpp:190), so NoteHostWrite captures two.
    • PublishToGuest then throws at its explicit publication.size() == 3u check (DepthSurface.cpp:2184). It fails loudly rather than mis-indexing the stencil plane as HTILE.
  • Merge a4cd5ea600 (the publication branch into this branch) carries only that merge.
  • No new author comments or replies. The description and checklist are unchanged.

What I ran

Head a4cd5ea60044c2ea4e331a0ac99fec155d09027e, merged --no-ff onto main 4f41f4c375f5abb487dbd184fbc150f31994d762 (merged tree 4e3f9208d2d619691bc38032ab1b3250e43bab82). Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6).

git show --cc 0180bafe62f4 -- core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp docs/dev/debt/libSceAgcDriver.md
git diff 4f41f4c375 4e3f9208d2 -- core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
git diff d1ae628bc2 6e2b8263c2 -- core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...a4cd5ea60044c2ea4e331a0ac99fec155d09027e
python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer ctest --test-dir build -V -R "^agc_driver_native_depth_uniform_planes$"
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "agc_driver_native_(depth|multisample)|agc_driver_multisample_retirement|agc_driver_depth_plane_fill|agc_driver_depth_surface_from_storage|stencil_plane"
git status --porcelain
Check Result
git diff --check clean
check_conventions.py 0 errors. One debt-length warning on docs/dev/debt/libSceAgcDriver.md:69 (the sampling entry, which main already flagged)
Build / libs (script) passed
Selected tests (script): 2230 ran 0 new failures, 0 timeouts. The 7 known failures also fail on main
Validation comparison (script): 770 tests layer loaded in 769 and missing in none. One test has new VUID- lines: agc_driver_native_depth_uniform_planes, which did not run on the baseline (see below)
Focused set: 19 tests 18 passed, 1 skipped (agc_driver_native_depth_bda_clear, a device limitation)
Worktree git status --porcelain is empty

About the new VUID. agc_driver_native_depth_uniform_planes was added by main. The script's baseline (d1ae628bc2) is older than that test, so it had nothing to compare against. When I ran the test alone with the layer, it passes and prints 8 × VUID-vkCmdDispatch-groupCountX-00386.

Message
Native D32S8 without HTILE, samples=4: uniform planes imported and sampled, other planes refused
Validation Error: [ VUID-vkCmdDispatch-groupCountX-00386 ] | MessageID = 0x8e927036
vkCmdDispatch(): groupCountX (69144) exceeds device limit maxComputeWorkGroupCount[0] (65535).

69144 is 129 × 67 × 8. The source is the test's own fetch:

  • fetch.Run(batch.Handle(), extent.width * extent.height * samples) in CheckUniformPlanesWithoutHtile (tests/execution/NativeMultisampleDepth.cpp:3165-3167, and again for the stencil plane right after it).
  • Fetch::Run (NativeMultisampleDepth.cpp:519-522) dispatches that count as groupCountX.
  • The extent is {129u, 67u} (NativeMultisampleDepth.cpp:3112).

This PR does not touch that function. The VUID is main's, so I do not count it against this PR. It is worth a separate fix on main: split the dispatch, or use a 2D grid.

Previous findings

  • The diff still carries #13021: Still open, non-blocking. The branch still contains the publication series. Merge #13021 first, as Depends on says.
  • The import reads the stencil plane twice: Still open, non-blocking. The PR's commits are unchanged (range-diff =), and the merge did not touch prepareDepthSampling's stencil proof.

New findings

Blocking

None.

Non-blocking

  • The publication debt entry omits main's D32S8 owners without HTILE (docs/dev/debt/libSceAgcDriver.md:68).
    • The entry lists "D16/D32-only owners" among the cases that throw.
    • Since this merge, a host-written D32S8 owner imported without HTILE (DepthSurface.cpp:190) also throws on a guest read. Its two captured planes fail publication.size() == 3u (DepthSurface.cpp:2184).
    • The behaviour is correct, since it throws, but the gap is not recorded. Suggested fix: add "D32S8 owners without HTILE" to that sentence.

Not verified

  • Negative control not rerun. The PR's commits are identical to the ones I reviewed before, and the merge changed none of this PR's tests. The earlier negative control still applies.
  • No main-only rerun of the new VUID.
    • I could not rebuild the test binary with the PR's files restored from main: CMake regeneration is not permitted in my sandbox.
    • I attribute the VUID to main from the source instead. The dispatch size comes from main's unchanged test code, which this PR does not modify.
  • Only lavapipe. I made no run on another GPU, on Windows, or on a title. The NVIDIA and AMD CI runs in the discussion cover f49ecfc, not this head.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5749949199 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13023#pullrequestreview-5749949199). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T09:43:33Z. **Review:** APPROVED --- # Re-checked — approved Since `4767e11`, the only change is a new merge of `main`. It resolves conflicts in `GuestMemory.cpp` and `docs/dev/debt/libSceAgcDriver.md` and keeps both sides in each. The checks and the focused tests pass. The one new `VUID-` the script reports comes from a test that `main` added, not from this PR. ## What changed since my last review - **The PR's own commits are unchanged.** delta.patch shows all six commits identical (`0a3252876f` … `f6e7798ba9`). - **Merge `0180bafe62`** (`main` `4f41f4c375` into the publication branch) resolved two conflicts: - **`Execution/src/GuestMemory.cpp`:** `main` added `WriteChanged(..., byteStoreLimit)` and `WriteChangedKeepingGuest`, both through `writeChanged(..., keepGuest)`. The branch had added `WriteChangedIfHeld`. The resolution keeps all three, placed next to each other. All of the branch's other tracker changes are intact: `cpuUnchanged`, the `walked` parameter of `rangeUnchanged`, `storeOwn(..., complete)` and `UnchangedSinceLastCollect`. `git diff 4f41f4c375 4e3f9208d2` on this file is exactly the branch's earlier change against `d1ae628bc2`. `main`'s callers (`GuestBufferMemory.cpp:6837`, `GuestBufferMemory.cpp:6846`) and its test (`tests/Pm4.cpp:895`) still reach `WriteChangedKeepingGuest`. - **Debt file:** the branch's edited "Native multisampled depth clears" entry, its new "Native D32S8 guest publication" entry and its trimmed sampling entry are kept. `main`'s new "Native multisampled D32S8 depth without HTILE" entry is kept at `docs/dev/debt/libSceAgcDriver.md:70`. - **`DepthSurface.cpp` merged without conflicts** with `main`'s import of D32S8 targets without HTILE. I checked how that new owner interacts with publication: - Its `sampling.initial` holds two planes (`DepthSurface.cpp:190`), so `NoteHostWrite` captures two. - `PublishToGuest` then throws at its explicit `publication.size() == 3u` check (`DepthSurface.cpp:2184`). It fails loudly rather than mis-indexing the stencil plane as HTILE. - **Merge `a4cd5ea600`** (the publication branch into this branch) carries only that merge. - **No new author comments or replies.** The description and checklist are unchanged. ## What I ran Head `a4cd5ea60044c2ea4e331a0ac99fec155d09027e`, merged `--no-ff` onto `main` `4f41f4c375f5abb487dbd184fbc150f31994d762` (merged tree `4e3f9208d2d619691bc38032ab1b3250e43bab82`). Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6). ``` git show --cc 0180bafe62f4 -- core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp docs/dev/debt/libSceAgcDriver.md git diff 4f41f4c375 4e3f9208d2 -- core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp git diff d1ae628bc2 6e2b8263c2 -- core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...a4cd5ea60044c2ea4e331a0ac99fec155d09027e python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762 env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer ctest --test-dir build -V -R "^agc_driver_native_depth_uniform_planes$" ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "agc_driver_native_(depth|multisample)|agc_driver_multisample_retirement|agc_driver_depth_plane_fill|agc_driver_depth_surface_from_storage|stencil_plane" git status --porcelain ``` | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | 0 errors. One `debt-length` warning on `docs/dev/debt/libSceAgcDriver.md:69` (the sampling entry, which `main` already flagged) | | Build / `libs` (script) | passed | | Selected tests (script): 2230 ran | 0 new failures, 0 timeouts. The 7 known failures also fail on `main` | | Validation comparison (script): 770 tests | layer loaded in 769 and missing in none. One test has new `VUID-` lines: `agc_driver_native_depth_uniform_planes`, which did not run on the baseline (see below) | | Focused set: 19 tests | 18 passed, 1 skipped (`agc_driver_native_depth_bda_clear`, a device limitation) | | Worktree | `git status --porcelain` is empty | **About the new VUID.** `agc_driver_native_depth_uniform_planes` was added by `main`. The script's baseline (`d1ae628bc2`) is older than that test, so it had nothing to compare against. When I ran the test alone with the layer, it passes and prints 8 × `VUID-vkCmdDispatch-groupCountX-00386`. <details><summary>Message</summary> ``` Native D32S8 without HTILE, samples=4: uniform planes imported and sampled, other planes refused Validation Error: [ VUID-vkCmdDispatch-groupCountX-00386 ] | MessageID = 0x8e927036 vkCmdDispatch(): groupCountX (69144) exceeds device limit maxComputeWorkGroupCount[0] (65535). ``` </details> 69144 is 129 × 67 × 8. The source is the test's own fetch: - `fetch.Run(batch.Handle(), extent.width * extent.height * samples)` in `CheckUniformPlanesWithoutHtile` (`tests/execution/NativeMultisampleDepth.cpp:3165-3167`, and again for the stencil plane right after it). - `Fetch::Run` (`NativeMultisampleDepth.cpp:519-522`) dispatches that count as `groupCountX`. - The extent is `{129u, 67u}` (`NativeMultisampleDepth.cpp:3112`). This PR does not touch that function. The VUID is `main`'s, so I do not count it against this PR. It is worth a separate fix on `main`: split the dispatch, or use a 2D grid. ## Previous findings - **The diff still carries #13021: Still open, non-blocking.** The branch still contains the publication series. Merge #13021 first, as `Depends on` says. - **The import reads the stencil plane twice: Still open, non-blocking.** The PR's commits are unchanged (range-diff `=`), and the merge did not touch `prepareDepthSampling`'s stencil proof. ## New findings ### Blocking None. ### Non-blocking - **The publication debt entry omits `main`'s D32S8 owners without HTILE** (`docs/dev/debt/libSceAgcDriver.md:68`). - The entry lists "D16/D32-only owners" among the cases that throw. - Since this merge, a host-written D32S8 owner imported without HTILE (`DepthSurface.cpp:190`) also throws on a guest read. Its two captured planes fail `publication.size() == 3u` (`DepthSurface.cpp:2184`). - The behaviour is correct, since it throws, but the gap is not recorded. Suggested fix: add "D32S8 owners without HTILE" to that sentence. ## Not verified - **Negative control not rerun.** The PR's commits are identical to the ones I reviewed before, and the merge changed none of this PR's tests. The earlier negative control still applies. - **No main-only rerun of the new VUID.** - I could not rebuild the test binary with the PR's files restored from `main`: CMake regeneration is not permitted in my sandbox. - I attribute the VUID to `main` from the source instead. The dispatch size comes from `main`'s unchanged test code, which this PR does not modify. - **Only lavapipe.** I made no run on another GPU, on Windows, or on a title. The NVIDIA and AMD CI runs in the discussion cover `f49ecfc`, not this head. <!-- anyps5-bots job=3257 head=a4cd5ea60044c2ea4e331a0ac99fec155d09027e -->
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!13023
No description provided.