fix(agc): import native multisample depth whose HTILE is not ITERATE_256 #6557

Merged
simonbronk merged 2 commits from upstream-pr/6557 into main 2026-10-19 22:51:51 +00:00
simonbronk commented 2026-10-15 20:36:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-15T20:36:49Z.


What

Fixes #6362. The initial import of native multisample depth (DepthSurface.cpp) refused a target whose HTILE is not ITERATE_256. The import never reads compressed Z planes. It writes the HTILE clear words and the expanded samples, and neither depends on ITERATE_256:

  • Mesa radv_get_htile_fast_clear_value builds the clear word from the depth value, stencil presence and VRS only.
  • The Addrlib HTILE footprint (HtileMetadataBytes) has no ITERATE_256 input.
  • Mesa ac_descriptors.c sets ITERATE_256 only for TC-compatible reads of compressed MSAA HTILE ("TC-compatible MSAA HTILE requires ITERATE_256"), which is the sampling path, not this import.

The import now requires pipe-aligned HTILE without VRS, with ITERATE_256 on or off. CheckResource still requires the resource and the target to agree on ITERATE_256, so a later sample of the same memory with a different setting is still refused. The debt entry in docs/dev/debt/libSceAgcDriver.md names the sources.

agc_driver_native_multisample_depth now runs every target with ITERATE_256 on and off (24 cases), and its mismatch case flips the bit both ways. The eligibility case that used ITERATE_256 = false as the HTILE refusal now uses a misaligned HTILE address. On main the test fails at the first ITERATE_256 = false target.

Next blocker for the title, not in this PR: compute shader 0x211200d000 reads the depth back from guest memory and hits sample-preserving guest publication of native multisample depth is not implemented. No open PR implements it. #6498 and #6480 refuse related paths; @Gashrod1's #6297, #6300 and #6423 work on native multisample depth sampling.

Tested

  • Windows 11 Pro 26200, Onimusha: Way of the Sword (PPSA27836) with APS5_NO_HOST_IMPORT=1 (the #6374 workaround). Before: the load stops at the #6362 refusal. After: it passes that point and stops at the next blocker above.
  • ctest -R "agc|shader|video_out" -j 8 on both GPUs. NVIDIA: all pass. AMD: the 3 tests of #5271 fail, as on main. agc_driver_gpu_indirect_arguments_misaligned_writer_ahead (from main) does not build with GCC/MinGW (requested alignment '65536' exceeds object file maximum 8192), so it did not run on either GPU.
  • agc_driver_native_multisample_depth: passes on both GPUs, fails on main.
  • python tools/check_conventions.py --base upstream/main: passed.

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
  • Unblocks: PPSA27836 #5769
  • GPUs tested: NVIDIA GeForce RTX 5070, driver 617.42, Windows 11 Pro 26200; AMD Radeon gfx1036 iGPU, Windows 11 Pro 26200
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4879505308 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6557). Originally posted by [simonbronk](https://github.com/simonbronk) on 2026-10-15T20:36:49Z. --- ### What Fixes #6362. The initial import of native multisample depth (`DepthSurface.cpp`) refused a target whose HTILE is not `ITERATE_256`. The import never reads compressed Z planes. It writes the HTILE clear words and the expanded samples, and neither depends on `ITERATE_256`: - Mesa `radv_get_htile_fast_clear_value` builds the clear word from the depth value, stencil presence and VRS only. - The Addrlib HTILE footprint (`HtileMetadataBytes`) has no `ITERATE_256` input. - Mesa `ac_descriptors.c` sets `ITERATE_256` only for TC-compatible reads of compressed MSAA HTILE ("TC-compatible MSAA HTILE requires ITERATE_256"), which is the sampling path, not this import. The import now requires pipe-aligned HTILE without VRS, with `ITERATE_256` on or off. `CheckResource` still requires the resource and the target to agree on `ITERATE_256`, so a later sample of the same memory with a different setting is still refused. The debt entry in `docs/dev/debt/libSceAgcDriver.md` names the sources. `agc_driver_native_multisample_depth` now runs every target with `ITERATE_256` on and off (24 cases), and its mismatch case flips the bit both ways. The eligibility case that used `ITERATE_256 = false` as the HTILE refusal now uses a misaligned HTILE address. On `main` the test fails at the first `ITERATE_256 = false` target. Next blocker for the title, not in this PR: compute shader `0x211200d000` reads the depth back from guest memory and hits `sample-preserving guest publication of native multisample depth is not implemented`. No open PR implements it. #6498 and #6480 refuse related paths; @Gashrod1's #6297, #6300 and #6423 work on native multisample depth sampling. ### Tested - Windows 11 Pro 26200, Onimusha: Way of the Sword (PPSA27836) with `APS5_NO_HOST_IMPORT=1` (the #6374 workaround). Before: the load stops at the #6362 refusal. After: it passes that point and stops at the next blocker above. - `ctest -R "agc|shader|video_out" -j 8` on both GPUs. NVIDIA: all pass. AMD: the 3 tests of #5271 fail, as on `main`. `agc_driver_gpu_indirect_arguments_misaligned_writer_ahead` (from `main`) does not build with GCC/MinGW (`requested alignment '65536' exceeds object file maximum 8192`), so it did not run on either GPU. - `agc_driver_native_multisample_depth`: passes on both GPUs, fails on `main`. - `python tools/check_conventions.py --base upstream/main`: passed. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: PPSA27836 #5769 - [x] GPUs tested: NVIDIA GeForce RTX 5070, driver 617.42, Windows 11 Pro 26200; AMD Radeon gfx1036 iGPU, Windows 11 Pro 26200 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-15 20:46:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T20:46:43Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1368 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 2434 docs/dev/debt/libSceAgcDriver.md
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5499 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5925 docs/dev/debt/libSceAgcDriver.md
PR 6146 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6194 docs/dev/debt/libSceAgcDriver.md
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 docs/dev/debt/libSceAgcDriver.md
PR 6292 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 6300 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6481 docs/dev/debt/libSceAgcDriver.md
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6549 docs/dev/debt/libSceAgcDriver.md
PR 6612 docs/dev/debt/libSceAgcDriver.md
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 6636 docs/dev/debt/libSceAgcDriver.md
PR 6683 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6730 docs/dev/debt/libSceAgcDriver.md
PR 6808 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6868 docs/dev/debt/libSceAgcDriver.md
PR 6926 docs/dev/debt/libSceAgcDriver.md
PR 6947 docs/dev/debt/libSceAgcDriver.md
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7201 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 7233 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7332 core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7371 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
PR 7446 docs/dev/debt/libSceAgcDriver.md
PR 7449 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7505 docs/dev/debt/libSceAgcDriver.md
PR 7533 docs/dev/debt/libSceAgcDriver.md
PR 7604 docs/dev/debt/libSceAgcDriver.md
PR 7642 docs/dev/debt/libSceAgcDriver.md
PR 7800 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7844 docs/dev/debt/libSceAgcDriver.md
PR 7927 docs/dev/debt/libSceAgcDriver.md
PR 8014 docs/dev/debt/libSceAgcDriver.md
PR 8099 docs/dev/debt/libSceAgcDriver.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6201936029 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6557#issuecomment-6201936029). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T20:46:43Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 1368](https://www.github.com/boykopovar/AnyPS5/pull/1368) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5058](https://www.github.com/boykopovar/AnyPS5/pull/5058) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6146](https://www.github.com/boykopovar/AnyPS5/pull/6146) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6194](https://www.github.com/boykopovar/AnyPS5/pull/6194) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6223](https://www.github.com/boykopovar/AnyPS5/pull/6223) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6273](https://www.github.com/boykopovar/AnyPS5/pull/6273) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6292](https://www.github.com/boykopovar/AnyPS5/pull/6292) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6549](https://www.github.com/boykopovar/AnyPS5/pull/6549) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6612](https://www.github.com/boykopovar/AnyPS5/pull/6612) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6615](https://www.github.com/boykopovar/AnyPS5/pull/6615) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 6636](https://www.github.com/boykopovar/AnyPS5/pull/6636) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6683](https://www.github.com/boykopovar/AnyPS5/pull/6683) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6730](https://www.github.com/boykopovar/AnyPS5/pull/6730) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6867](https://www.github.com/boykopovar/AnyPS5/pull/6867) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6926](https://www.github.com/boykopovar/AnyPS5/pull/6926) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 7233](https://www.github.com/boykopovar/AnyPS5/pull/7233) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp` | | [PR 7256](https://www.github.com/boykopovar/AnyPS5/pull/7256) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7371](https://www.github.com/boykopovar/AnyPS5/pull/7371) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp` | | [PR 7446](https://www.github.com/boykopovar/AnyPS5/pull/7446) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7449](https://www.github.com/boykopovar/AnyPS5/pull/7449) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7505](https://www.github.com/boykopovar/AnyPS5/pull/7505) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7533](https://www.github.com/boykopovar/AnyPS5/pull/7533) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7604](https://www.github.com/boykopovar/AnyPS5/pull/7604) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7800](https://www.github.com/boykopovar/AnyPS5/pull/7800) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7844](https://www.github.com/boykopovar/AnyPS5/pull/7844) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7927](https://www.github.com/boykopovar/AnyPS5/pull/7927) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 8014](https://www.github.com/boykopovar/AnyPS5/pull/8014) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 8099](https://www.github.com/boykopovar/AnyPS5/pull/8099) | `docs/dev/debt/libSceAgcDriver.md` |
coltken95 commented 2026-10-15 21:43:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by coltken95 on 2026-10-15T21:43:51Z.


Tested on Linux x86-64 (Release build, lavapipe / llvmpipe LLVM 20.1.2), with 7716b6258 merged into main 31cbb55d7:

  • With the PR: agc_driver_native_multisample_depth, agc_driver_native_depth_clears, agc_driver_native_depth_clear_refusals and agc_driver_native_depth_retirement pass.
  • With main's sources: agc_driver_native_multisample_depth fails with AGC graphics: multisample target refusal did not match sample-preserving guest publication: (the reason after the colon is empty).

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6202909529 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6557#issuecomment-6202909529). Originally posted by [coltken95](https://github.com/coltken95) on 2026-10-15T21:43:51Z. --- Tested on Linux x86-64 (Release build, lavapipe / llvmpipe LLVM 20.1.2), with 7716b6258 merged into main 31cbb55d7: - With the PR: `agc_driver_native_multisample_depth`, `agc_driver_native_depth_clears`, `agc_driver_native_depth_clear_refusals` and `agc_driver_native_depth_retirement` pass. - With main's sources: `agc_driver_native_multisample_depth` fails with `AGC graphics: multisample target refusal did not match sample-preserving guest publication:` (the reason after the colon is empty). AI-assisted: yes (Claude Code)
Gashrod1 commented 2026-10-16 08:08:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Gashrod1 on 2026-10-16T08:08:54Z.


@simonbronk this overlaps with #6300 in three places:

  • the prepareDepthSampling eligibility line, where #6300 adds the D32S8 checks just above it;
  • the CheckDepthTarget signature and the eligibility cases in the test;
  • debt line L15.

The two changes are independent, so whichever lands second has to rebase. If #6557 lands first, I'll rebase #6300 onto it.

About the Onimusha blocker: on Dave the Diver, sample-preserving guest publication of native multisample depth is not implemented also showed up in cases that were not real publication:

  • the CPU reused or rewrote the memory of a native depth owner before a guarded read;
  • another depth plane was placed over its HTILE.

Releasing the owner in those cases is on my local branch and will come as a PR. If compute shader 0x211200d000 really reads the live depth back from guest memory, that is publication, and it is still not implemented. The same check on your side would tell which case Onimusha hits: whether the read range was rewritten by the CPU after the import.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6211049579 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6557#issuecomment-6211049579). Originally posted by [Gashrod1](https://github.com/Gashrod1) on 2026-10-16T08:08:54Z. --- @simonbronk this overlaps with #6300 in three places: - the `prepareDepthSampling` eligibility line, where #6300 adds the D32S8 checks just above it; - the `CheckDepthTarget` signature and the eligibility cases in the test; - debt line L15. The two changes are independent, so whichever lands second has to rebase. If #6557 lands first, I'll rebase #6300 onto it. About the Onimusha blocker: on Dave the Diver, `sample-preserving guest publication of native multisample depth is not implemented` also showed up in cases that were not real publication: - the CPU reused or rewrote the memory of a native depth owner before a guarded read; - another depth plane was placed over its HTILE. Releasing the owner in those cases is on my local branch and will come as a PR. If compute shader `0x211200d000` really reads the live depth back from guest memory, that is publication, and it is still not implemented. The same check on your side would tell which case Onimusha hits: whether the read range was rewritten by the CPU after the import. AI-assisted: yes
simonbronk commented 2026-10-16 12:17:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-16T12:17:36Z.


@Gashrod1 agreed: the two are independent, and whichever lands second rebases. If #6300 goes first, I'll rebase this one.

On the publication stop: I checked the cases you list on the title. The first stop was an unwritten surface (only a depth-test draw with depth writes off between the import and the read), and #6727 retires it. The next one, after #6762, is a real write: a DB_SHADER_CONTROL 0x45 draw replaces the stencil of the 4-sample D32 target, and compute 0x211183a700 reads that memory (details in #6570). So the title needs the publication itself. Your owner-release branch is still welcome; I'll run it on the title when it's a PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6215325081 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6557#issuecomment-6215325081). Originally posted by [simonbronk](https://github.com/simonbronk) on 2026-10-16T12:17:36Z. --- @Gashrod1 agreed: the two are independent, and whichever lands second rebases. If #6300 goes first, I'll rebase this one. On the publication stop: I checked the cases you list on the title. The first stop was an unwritten surface (only a depth-test draw with depth writes off between the import and the read), and #6727 retires it. The next one, after #6762, is a real write: a `DB_SHADER_CONTROL` 0x45 draw replaces the stencil of the 4-sample D32 target, and compute `0x211183a700` reads that memory (details in #6570). So the title needs the publication itself. Your owner-release branch is still welcome; I'll run it on the title when it's a PR.
jotitadev commented 2026-10-19 03:22:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-19T03:22:44Z.

Review: COMMENTED


Apple GPU / MoltenVK run. As written, agc_driver_native_multisample_depth is skipped on macOS. With a local test-only patch it runs on Metal: it fails without the fix and passes with it.

Machine: Apple M2 Max, macOS 27.2, x86-64 build under Rosetta. Head 752cca10f, PR diff applied cleanly. Drivers: MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0) and MoltenVK main + SPIRV-Cross #2704.

Tested: the tree is main a373e85e5 + mugurc's macOS series (ci/macos-series-2, includes ImportWatched) + the PRs needed to build on macOS (#6667, #6668, #7524, #6969, and two files of #7332), not plain main (it doesn't build on macOS yet). #6639 and #6636 were stacked in the same build (no conflicts). Base on that tree: 40 ^agc failures with MoltenVK 1.4.2 and 26 with MoltenVK main + #2704.

  • The test makes its own Vulkan instance: it loads libvulkan.so.1 on everything but Windows and doesn't enable VK_KHR_portability_enumeration. On macOS it prints skipped, no usable Vulkan device: AGC graphics: cannot load Vulkan, so ctest counts it as passed with or without the fix. Even with a libvulkan.so.1 symlink, vkCreateInstance returns -9. This was already the case on main and isn't from this PR (PresentationPass.cpp and PerformanceOverlay.cpp load Vulkan the same way).
  • Locally I patched only the test: libvulkan.1.dylib on __APPLE__, portability enumeration on the instance, and VK_KHR_portability_subset on the device. With that patch, 16 of the 24 cases run (D16 and D32, 2x and 4x, ITERATE_256 on and off). The M2 Max has no 8x depth, so the other 8 are unavailable (Native multisampled depth cases checked=16 unavailable=8).
    • With the PR: passes 3 of 3 on both drivers.
    • Without the fix (DepthSurface.cpp back to the base): fails with multisample target refusal did not match sample-preserving guest publication:, the same message coltken95 saw on lavapipe.
  • Full ^agc suite with the stack: the base failures on each driver, plus agc_driver_address_draw_reuse from #6636 (reported there).

The loader fix probably belongs in a separate PR, not here.

GPUs tested: Apple M2 Max (MoltenVK 1.4.2; MoltenVK main + SPIRV-Cross #2704)

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

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5566570297 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6557#pullrequestreview-5566570297). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-19T03:22:44Z. **Review:** COMMENTED --- <!-- head: 752cca10f --> Apple GPU / MoltenVK run. As written, `agc_driver_native_multisample_depth` is skipped on macOS. With a local test-only patch it runs on Metal: it fails without the fix and passes with it. Machine: Apple M2 Max, macOS 27.2, x86-64 build under Rosetta. Head 752cca10f, PR diff applied cleanly. Drivers: MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0) and MoltenVK main + SPIRV-Cross #2704. **Tested:** the tree is `main` a373e85e5 + mugurc's macOS series (`ci/macos-series-2`, includes ImportWatched) + the PRs needed to build on macOS (#6667, #6668, #7524, #6969, and two files of #7332), not plain `main` (it doesn't build on macOS yet). #6639 and #6636 were stacked in the same build (no conflicts). Base on that tree: 40 `^agc` failures with MoltenVK 1.4.2 and 26 with MoltenVK main + #2704. - The test makes its own Vulkan instance: it loads `libvulkan.so.1` on everything but Windows and doesn't enable `VK_KHR_portability_enumeration`. On macOS it prints `skipped, no usable Vulkan device: AGC graphics: cannot load Vulkan`, so ctest counts it as passed with or without the fix. Even with a `libvulkan.so.1` symlink, `vkCreateInstance` returns -9. This was already the case on `main` and isn't from this PR (`PresentationPass.cpp` and `PerformanceOverlay.cpp` load Vulkan the same way). - Locally I patched only the test: `libvulkan.1.dylib` on `__APPLE__`, portability enumeration on the instance, and `VK_KHR_portability_subset` on the device. With that patch, 16 of the 24 cases run (D16 and D32, 2x and 4x, `ITERATE_256` on and off). The M2 Max has no 8x depth, so the other 8 are unavailable (`Native multisampled depth cases checked=16 unavailable=8`). - With the PR: passes 3 of 3 on both drivers. - Without the fix (`DepthSurface.cpp` back to the base): fails with `multisample target refusal did not match sample-preserving guest publication:`, the same message coltken95 saw on lavapipe. - Full `^agc` suite with the stack: the base failures on each driver, plus `agc_driver_address_draw_reuse` from #6636 (reported there). The loader fix probably belongs in a separate PR, not here. GPUs tested: Apple M2 Max (MoltenVK 1.4.2; MoltenVK main + SPIRV-Cross #2704) Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
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!6557
No description provided.