fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742

Merged
EagleBearerYS merged 27 commits from upstream-pr/9742 into main 2026-11-04 06:26:51 +00:00
EagleBearerYS commented 2026-10-22 11:43:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T11:43:57Z.


What

#9533 and #9717 have merged (2026-11-02), so this PR's diff is now only its own change on main.

Ghost of Tsushima Director's Cut (PPSA02225) stops at the import of a native multisampled D32S8 target on #9533 (milescoviello's run, warm and cold). The title has an R32F 2-sample colour target over the target's depth plane, last cleared to 0:

native multisample depth 0x1544ed0000+0x1fe0000 aliases multisampled colour target ... (vk format 100, 2 samples), newest clear 0
AGC graphics: native multisample depth or HTILE aliases a multisampled colour target whose samples are only on the host

Dave the Diver (PPSA19115) stops at the same import on a test branch with #9717 (tablefrogpillow's run): a two-sample D32S8 target whose HTILE carries its stencil (not depth-only), with one two-sample R32F colour target over the depth plane, newest a clear to 0, and DB_DEPTH_CLEAR 0.0. This PR now accepts that case at import; a Dave the Diver run on this branch is still pending, so this PR doesn't yet claim the game gets past the stop.

Why the colour target's samples aren't needed:

  • Before the sample, the title fills the whole HTILE (0x50000 bytes) and the whole stencil plane (0x870000) with 0.
  • On a depth-only HTILE, the import already requires every HTILE word to prove the clear against DB_DEPTH_CLEAR, the title's own register.
  • Where every tile proves the clear, depth reads the clear value and never the plane's bytes. So the colour target over the depth plane can't change the imported depth, whatever it holds.

The change:

  • At import (prepareDepthSampling): with a depth-only HTILE, or a pipe-aligned HTILE without VRS in the depth and stencil layout (the only other one the import admits), one multisampled colour target over the depth plane is accepted when it has the target's sample count. The HTILE check that follows still refuses unless every word proves DB_DEPTH_CLEAR; in the depth and stencil layout every word masked with 0xfffff00f (Z range and ZMask) must be 0 for 0.0 or 0xfffc0000 for 1.0, the words of Mesa's radv_get_htile_fast_clear_value. The accepted target is recorded with its identity, a content counter (clears, recreates, draws, storage views) and its newest content. Its value isn't used.
  • At every sample and stencil-tested bind (CheckCurrent): it passes only while that recorded target is still the one colour target over the plane, unchanged, or changed only by a still-pending run of fills that each cover its whole guarded range with the recorded clear value, bit for bit. Dave the Diver (PPSA19115) fills it twice with 0 between two samples. A draw or clear into it, a partial fill or a fill of another value anywhere since the import, or a second colour target over the plane refuses with the existing text.
  • A stencil in HTILE is still proven only by HTILE: every word must hold SMem 0 at import and in a completed clear, and any colour target over the stencil plane still refuses.
  • Unchanged: HTILE aliases, the stencil-plane rule from #9533, and every other refusal.
  • Debt: two entries of this PR's own. "Native multisampled depth sampling under a colour target" says which depth-plane alias is accepted, with its unmeasured console behaviour first. "... over unproven tiles or the stencil plane" says what still refuses. #9533's "Native multisampled depth sampling" entry is unchanged.

Tests: the regression controls follow JJenkx's review of the rule on #9533 (comment): matching vs mismatching depth clear, exact vs partial range, sample-count mismatch, and a draw after the clear.

Known risk: a guest read of a target this PR newly accepts, or a resource the title creates over its memory, publishes the target. That publication refuses while the colour alias is resident (native multisample depth publication over a resident colour target is not implemented). Curved Space (PPSA02817) and New Joe & Mac: Caveman Ninja (PPSA02801) take the memory-reuse path on main with #9533's targets (JJenkx's prints in D#8691 and D#9091, after his bisect to a4b76b2c0a; our reply).

Overlap: checked with git merge-tree and the overlap tool.

  • The stack: this PR was built on #9533, which has merged, so #9533's overlaps are on main now. This PR's own commit adds nothing to them. With #8223, both conflicts (DepthSurfaceView's signature and guard()) are #9533's own, and the same at 514643ab16.
  • #9717 (the stencil view, also stacked on #9533): adjacent additions in CMakeLists.txt, NativeMultisampleDepth.cpp and the debt file. Keeping both sides resolves them. #9717 merged first, and the merge of main 88e804b0a7 (see Tested) keeps both PRs' additions.
  • #9533's head, which includes #7233 and #7371: merging 1d16d5029d (b39dbaecdb) needed only #9533's debt entry, where both sides' edits are kept, and 9afaa90c1f (39b338cf45) merged cleanly, and a45dff8d51 (9334be4972), #9533's merge of main with #6727, again needed only #9533's debt entry, where both sides' edits are kept. Merging 1582cf6cc0 (07007fdc45), #9533's queued-fill skip, needed only that entry once more, and both sides' words are kept.
  • Other PRs touching DepthSurface.cpp or MultisampleTarget.* (#9186, #8998, #9700 and #9672 to #9676, open; #8999, #8847 and #7705, merged since): this commit adds no conflict with any of them beyond what #9533 already has.
  • #6044 (TaymKal) converts this file's test registrations to add_library_test and moves test files. The order is proposed in its thread (comment): this PR first; if #6044 lands first, agc_driver_native_depth_aliased_depth is registered with add_library_test(graphics ...) at this PR's next merge of main.
  • #8115 and #8121 (milescoviello) handle the title's next two stops: one-sample colour targets beside a multisampled rasterizer, and a PS_ITER_SAMPLE program into a one-sample target. Each merges cleanly with this head and with #9533 (git merge-tree against 2620f8d62e and c974601a60), so no order is needed between them.
  • #13021 (JAB-dev, native multisample D32S8 guest publication) merged first, as agreed in its thread. The merge of main 04a9eb4fa2 (see Tested) keeps both sides in MultisampleTarget.hpp and .cpp and in the AGC debt file: this PR's MultisampleColorTargetsOver takes #13021's TargetsLock, and the debt file keeps #13021's new entry and its edit of "Native multisampled depth sampling" beside this PR's two entries. In Ghost of Tsushima Director's Cut (PPSA02225), the run with this PR next stops on the publication line #13021 adds a D32S8 path in front of.
  • #15443 (edubox, a depth plane aliased by a cleared R32F target, for 7th Guest (PPSA17019)) clears the same refusal at the same index. It takes the depth value from an R32F colour target whose newest clear or fill, in [0, 1], covers exactly the depth plane: without HTILE, on the uniform-plane path this PR doesn't touch, and with HTILE when every word proves that value.
    • Conflicts: DepthSurface.cpp, in the index-0 branch of prepareDepthSampling and of CheckCurrent, and the test-list cmake.
    • They compose as a union, proposed in #15443's thread (note). At import, HTILE is checked against #15443's alias value first; failing that, this PR's sole-alias rule applies, with HTILE proving DB_DEPTH_CLEAR. In CheckCurrent, this PR's sameDepthAlias comes first, then #15443's value re-proof.
    • One test step changes: in #15443's CheckHtileAliasedDepth, the colour fill of 1.0 over HTILE words proving the target's own 0.0 is accepted and reads 0.0, so this PR's merge of main after #15443 turns that step into an accepted case.
    • Merge order: #15443 first, this one second. #15446, stacked on #15443, shares only the test list with this PR.
  • CMakeLists.txt and the AGC debt file are shared with many PRs, by neighbouring lines only.

Tested

  • Linux, Mesa llvmpipe (which runs 4 samples). The new agc_driver_native_depth_aliased_depth has 10 cases at DB_DEPTH_CLEAR 0.0 and 1.0 on a D32S8 target with a separate stencil plane and a pipe-aligned depth-only HTILE:
    • Accepted, sampling DB_DEPTH_CLEAR in every sample:
      • an R32F alias cleared to another value (0.25);
      • an alias cleared to DB_DEPTH_CLEAR;
      • an alias over part of the plane;
      • an alias drawn before the import;
      • a second sample with nothing changed.
    • Refused:
      • one HTILE word not proving the clear, and HTILE words proving the other clear value: "initial HTILE does not prove its clear value";
      • after the import, a draw into the alias, or a new colour target over the plane: the alias text.
    • Red: with DepthSurface.cpp and MultisampleTarget.* at #9533's head, the three acceptance cases fail with "native multisample depth or HTILE aliases a multisampled colour target whose samples are only on the host".
  • GitHub's runners (run):
    • Linux: the new test fails on #9533's head in all 3 runs, and the nine native depth tests pass 10 times each with the change.
    • Windows: the runner builds it, and its Vulkan tests skip there.
  • CI's Linux job mirrored on a cloud Linux machine: the only failures are the machine's three IPv6 tests.
  • Validation layer, #9533 (514643ab16) against this PR (CONTRIBUTING's AGC rule), on one GitHub Linux runner (run):
    • Setup: both runs used VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1 and ctest -V. The device was llvmpipe (LLVM 20.1.2) on Mesa 25.2.8, Ubuntu 24.04.5.
    • The tests: the nine native depth tests, named explicitly. #9533's tree has eight of them.
    • The layer: the loader inserted VK_LAYER_KHRONOS_validation 16 times on #9533's tree and 18 with this PR. Neither log has was not found but was requested by env var VK_INSTANCE_LAYERS.
    • The messages: both logs report only VUID-VkDeviceCreateInfo-pNext-pNext. This PR adds no VUID- message.
  • check_conventions.py: no errors and no comment lines added. One warning, debt-length, on #9533's native multisampled depth entry, which was already over the limit.
  • NVIDIA GeForce RTX 3070 Laptop GPU at 082ef25d86, the #9533, #9742 and #9717 stack before the #6727 merge (driver 617.42, Windows 11, WinLibs GCC 15.2.0, Release, ANYPS5_REQUIRE_VULKAN=1; GPU clocks weren't held, pass/fail only): agc_driver_native_depth_aliased_depth passes 5 of 5 at 2, 4 and 8 samples, 66 cases per run with none unavailable. So the 2- and 8-sample cases and the sample-count control (colour targets at the other two counts) run there, which lavapipe, with only 1 and 4 samples, can't. #9533's own native depth tests pass there too, except agc_driver_native_depth_driver_queued_fill: on Windows that queued fill refuses, as on main, and #9533 now skips the case there with the reason (1582cf6cc0; see #9533).
  • Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, on 219e925509 (comment): Linux, RTX 4070 Ti, NVIDIA 615.71.09, release libraries, 16 GB cap, warm and cold.
    • Warm: the import prints the depth-plane alias line and accepts it. The run stops at 14 s in the same compute shader on native multisample depth sampled identity or format mismatch. That looks like the per-sample stencil-plane read #9717 covers: @dantdmdarealguy's Windows run with #9717 got past it (#5166).
    • Cold: a SIGSEGV at 16 s with no message before it, in one run. The log ends on trophy statistics and shader cache counters, so it can't yet be tied to this change.
  • Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, with #9717 too, on the test branch test/ghost-9742-9717 (3ec696f7fe: this PR's 219e925509 and #9717's 767374011f, both on 514643ab16; comment). Same setup, warm at 16 GB and cold at 20 GB.
    • Warm reaches 246 s and cold 254 s, with no native multisample depth or stencil refusal. The alias line is printed once and the import is accepted.
    • Both stop at a color target's sample count differs from the rasterizer's, which milescoviello's #8115 handles.
    • The cold SIGSEGV didn't recur. milescoviello places it in the shader recompiler's MaskedSelectEliminator::Eliminate, not in this PR's code.
  • b39dbaecdb, #9533's head 1d16d5029d merged in (only #9533's debt entry needed resolving, and both sides' edits are kept there; outside it, this PR's own changes are the same by git diff -U0 patch-id), on GitHub's runners (run):
    • Linux: the 13 native depth, DCC clear and pipelined DMA tests and this PR's agc_driver_native_depth_aliased_depth pass 10 of 10, none skipped. The run was in validation mode, whose base arm builds #9533's own tree and runs only the 13 tests it has, so the red for agc_driver_native_depth_aliased_depth is the one in the first GitHub run above.
    • Validation, #9533's head against this PR, in the same run: the loader inserted VK_LAYER_KHRONOS_validation 21 times on #9533's tree and 230 with this PR, and neither log has was not found. Both logs report only VUID-VkDeviceCreateInfo-pNext-pNext, so this PR adds no VUID- message.
    • Windows: the runner builds them, and 13 Vulkan tests skip there.
    • Suites: libc and libkernel pass on both runners. The libc and libkernel suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • Validation, main b7d1d47a5f against b39dbaecdb (run), the same 14 tests once on one GitHub Linux runner. main's tree ran the 7 of them it has. The loader inserted VK_LAYER_KHRONOS_validation 11 times on main and 23 with this head, and neither log has was not found. Both logs report only VUID-VkDeviceCreateInfo-pNext-pNext, so the stack adds no VUID- message against main.
  • Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, with #9717, #8115 and #8121 (comment): the test branch test/ghost-9742-9717 (3ec696f7fe) with milescoviello's #8115 and #8121 merged on top, both clean; Linux, RTX 4070 Ti, NVIDIA 615.71.09, release libraries, 20 GiB cap, warm and cold.
    • With #8115 alone, the sample-count stop is gone, and warm (146 s) and cold (267 s) stop at a one-sample color target under a multisampled rasterizer without MSAA_ENABLE is unsupported with PS_ITER_SAMPLE, a sample index or coverage input, or a sample-mask export, which #8121 handles.
    • With #8115 and #8121, warm and cold both reach the 600 s limit with no refusal and no crash. In milescoviello's words, the game shows its brightness calibration screen, with the mask rendered correctly, and then its intro. The only native depth line is this stack's alias line, printed once and accepted.
    • The limits they report on that host: about 1.3 FPS on the brightness screen, with queue 0 the bottleneck; and two later warm runs killed at the 20 GiB cap, at 266 s and 478 s.
    • With #8213 and #8608 also merged, two of milescoviello's runs reach a 3D sampled view about 9 minutes into the opening (4781 MiB, of which 157 of its 900 slices lie inside a 2438 MiB guest allocation) and end at the 20 GiB cap, at 572 s and 563 s (comment). That view isn't a native depth view, so it's outside this stack's changes.
  • 39b338cf45, #9533's head 9afaa90c1f merged in (main 11f976b27c; clean, and this PR's own changes are the same by git diff -U0 patch-id), on GitHub's runners (run):
    • Linux: the 13 native depth, DCC clear and pipelined DMA tests and agc_driver_native_depth_aliased_depth pass 10 of 10, none skipped.
    • Validation, main against this head, in the same run: main's tree ran the 7 of these tests it has. The loader inserted VK_LAYER_KHRONOS_validation 11 times on main and 230 with this head, and neither log has was not found. Both logs report only VUID-VkDeviceCreateInfo-pNext-pNext, so this PR adds no VUID- message.
    • Windows: the runner builds them, and the Vulkan tests skip there.
    • Suites: libc and libkernel pass on both runners. The libc and libkernel suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 9334be4972, #9533's head a45dff8d51 merged in (main d6e7ab42df, which brings #6727; this PR's own changes are the same by git diff -U0), on GitHub's runners (run):
    • Linux: the 13 native depth, DCC clear and pipelined DMA tests and agc_driver_native_depth_aliased_depth pass 10 of 10, none skipped. #9533's agc_driver_native_depth_stencil fixture now notes a host write before its refusal checks, as #6727's own fixtures do, because #6727 retires an unwritten native multisample depth surface on a guest read instead of refusing it (#6727). That line is in #9533's merge.
    • Validation, main against this head, in the same run: main's tree ran the 7 of these tests it has. The loader inserted VK_LAYER_KHRONOS_validation 11 times on main and 230 with this head, and neither log has was not found. Both logs report only VUID-VkDeviceCreateInfo-pNext-pNext, so this PR adds no VUID- message.
    • Windows: the runner builds them, and the Vulkan tests skip there, so its lines are the suites only.
    • Suites: libc and libkernel pass on both runners. The libc and libkernel suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 07007fdc45, #9533's head 1582cf6cc0 merged in (#9533's queued-fill skip; this PR's own changes outside #9533's debt entry are the same by git diff -U0, and that entry keeps every word of both sides), on GitHub's runners (run):
    • Linux: the 13 native depth, DCC clear and pipelined DMA tests and agc_driver_native_depth_aliased_depth pass 10 of 10, none skipped.
    • Validation, main against this head, in the same run: main's tree ran the 7 of these tests it has. The loader inserted VK_LAYER_KHRONOS_validation 11 times on main and 230 with this head, and neither log has was not found. Both logs report only VUID-VkDeviceCreateInfo-pNext-pNext, so this PR adds no VUID- message.
    • Windows: the runner builds them, and the Vulkan tests skip there, so its lines are the suites only.
    • Suites: libc and libkernel pass on both runners. The libc and libkernel suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 9fc4f50e1e, #9533's head 53886418d9 merged in (#9533's test-only fix for jotitadev's macOS abort at exit; a clean merge, and this PR's own diff is unchanged by patch-id), on GitHub's runners (run):
    • Linux: agc_driver_native_depth_aliased_depth fails with #9533's code. With this PR it and the other native depth and native multisample depth tests pass 10 of 10, with agc_driver_native_depth_bda_clear skipping on llvmpipe, as on main.
    • Windows: the runner builds the 12 tests and skips them, since it has no Vulkan device.
    • Suites: libc and libkernel pass on both runners (116 and 198 on Linux, 143 and 208 on Windows). They ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • d658354769, a merge of #9533's de4cee5626, which merges main 0db47b263d. No conflicts. On GitHub's runners (run), of the agc_driver_native_depth* and agc_driver_native_multisample_depth* tests (12 tests), 11 pass 10 runs in a row on Linux and 1 skips: agc_driver_native_depth_bda_clear, main's test, because the device doesn't keep guest write watching for its native clear imports. On Windows all 12 build and skip, as the runner has no Vulkan device. The libc and libkernel suites pass on both, run with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners. An earlier run linked here didn't run this set, so it's replaced.
  • b3e6311c1f, a merge of #9533's 55b0a5f4ad, which merges main 3fcb5e4d76 and with it #8999. No conflicts. On GitHub's runners (run), the native, depth and multisample tests (^agc_driver_native_, ^agc_driver_depth_, ^agc_driver_msaa_) pass 10 runs in a row on Linux: 43 run, 39 pass, 4 skip (agc_driver_native_fmask, agc_driver_msaa_dcc_clear_2 and _8, and agc_driver_native_depth_bda_clear), 0 fail. On Windows 43 run, 3 pass 10 runs in a row and 40 skip without a Vulkan device, 0 fail. The libc and libkernel suites pass on both (142 and 204 tests on Linux, 169 and 217 on Windows), run with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • Ghost of Tsushima Director's Cut (PPSA02225), by @xXPBSXx (comment): Windows, AMD Radeon RX 6400, one run per state, all libraries rebuilt for each. On main 17f5335562 it stops on native multisample stencil or depth format import is not implemented; with #9533, on the CPU read over a multisampled colour target that milescoviello reported on #9533. With this PR on a later main, that stop is gone, and the run stops later in the same compute shader, 0x20001ef700, on native multisample depth sampled identity or format mismatch, as in milescoviello's Linux run above.
  • Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, at this head on current main (comment): main 2dc85609fc with #9717 (and #9533 under it), this PR's b3e6311c1f (its conflicts with #9717 in CMakeLists.txt, the test and the debt file taken from #9717's side; the library code is this PR's), #9129, #10064, #10727 (with #10685) and #10473. Linux, RTX 4070 Ti (NVIDIA 615.71.09), release libraries, warm shader and pipeline caches, one run with cross pressed periodically.
    • Without this PR, main with #9533 and #9717 on the same base stops at 40 s on native multisample depth or HTILE aliases a multisampled colour target whose samples are only on the host.
    • With it, the log has no refusal and no is not implemented line, and the alias this PR accepts is logged once (native multisample depth 0x1544ed0000+0x1fe0000 aliases multisampled colour target 0x1544ed0000+0x1fe0000 (vk format 100, 2 samples), newest clear 0x00000000 ...). The screenshots show black frames at 2 to 4 min, the mask screen at about 6 min and a letterboxed 3D night scene at about 8 min. The run ended at 493 s on its 19 GB memory cap, not on an error, with 8.5 GB of anonymous and 10.7 GB of shared guest memory resident and the device-local heap full.
  • b991bae852, a merge of #9533's merge of main (f7569e7ce1) (run). No conflict of its own; this PR's diff over #9533 is unchanged. The agc_driver_native_, agc_driver_depth_ and agc_driver_msaa_ tests pass 10 runs in a row. Linux: 43 run, 39 pass, 4 skip (the 2- and 8-sample DCC clears, as lavapipe has no 2- or 8-sample colour, and agc_driver_native_depth_bda_clear and agc_driver_native_fmask, which skip on that runner as in earlier runs), 0 fail. Windows: 43 run, 3 pass, 40 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (144 and 207) and on Windows (171 and 223). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 4ef2217dba, the stencil-in-HTILE commit (run), on b991bae852. agc_driver_native_depth_aliased_depth now runs every alias case with the stencil in HTILE (words 0xf0 and 0 for 0.0, 0xfffc00f0 for 1.0) and with a D32 target in the depth and stencil layout, plus a word with SMem 1 and a colour target over the stencil plane, which refuse.
    • Red/green, per case, with a harness linking each library (b3e6311c1f before, this commit after): the 60 new layout cases refuse with the depth-alias refusal before and pass after; the SMem and stencil-plane cases refuse both times, but with their own refusals only after, since before it the depth alias refuses first.
    • The agc_driver_native_depth and agc_driver_depth_ tests, 10 runs in a row. Linux: 34 run, 33 pass, 1 skip (agc_driver_native_depth_bda_clear, as in earlier runs), 0 fail; the before arm fails agc_driver_native_depth_aliased_depth. Windows: 34 run, 1 pass, 33 skip (no Vulkan device), 0 fail.
    • Suites: libc and libkernel pass on Linux (144 and 207); on Windows libc passes (171) and libkernel's guest_raise_in_system_call timed out at 30 s, as it did in the same run's main arm (222 of 223 pass). This PR changes nothing in libkernel. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • Validation (run), the same commit on b3e6311c1f (same patch-id): agc_driver_native_depth_aliased_depth and agc_driver_native_depth_aliased_stencil with VK_LAYER_KHRONOS_validation on both arms; the only VUID is VUID-VkDeviceCreateInfo-pNext-pNext, on both.
  • 3c22496168, a merge of #9533's head 078e6a68d8 (run). It takes #9533's merge of main, which brings in #9186's host-only flag for guard(). No conflict here. The agc_driver_native_, agc_driver_depth_, agc_driver_msaa_ and agc_driver_sample tests pass 10 runs in a row. Linux: 56 run, 50 pass, 6 skip (agc_driver_msaa_dcc_clear_2, agc_driver_msaa_dcc_clear_8, agc_driver_native_depth_bda_clear, agc_driver_native_fmask, agc_driver_sample_order_grid_reference, agc_driver_sample_order_recipe_depth_locations), 0 fail. Windows: 56 run, 5 pass, 51 skip (no Vulkan device), 0 fail. The before arm, main with this PR's tests, doesn't build. Suites: libc and libkernel pass on Linux (144 and 207) and on Windows (171 and 223). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 2c0814e5ee and 284d3a643b, the same-value fill commits (run), on 3c22496168. Dave the Diver (PPSA19115) fills the colour target over its depth plane with its recorded clear value between two samples, twice, and each fill refused the alias. 2c0814e5ee keeps the alias after one such fill and counts the fills a target notes; 284d3a643b keeps it through a run of them. agc_driver_native_depth_aliased_depth gains 15 cases in each of the 8 HTILE layouts:
    • Accepted: one, two and three whole-range fills of the clear value.
    • Refused: a fill of another value, of -0.0 over 0.0, of a NaN, of half the target or short of its guarded range; a partial or other-value fill before the same-value one; a draw before the fill; a guest HTILE write; and the runs same, other, same, then same, partial, same, then same, draw, same.
    • Red/green, per case, on lavapipe (4 samples), measured on the fork's copies of these two commits (the same patch-ids): before 2c0814e5ee, 64 of its 80 new sub-cases pass, with the same-value fill and the HTILE-write case failing 8 of 8 each (the HTILE case refuses at the alias check instead of the guest-write check); with it, 80 of 80. Before 284d3a643b, 104 of the 120 sub-cases of the 15 cases pass, with the two- and three-fill cases failing 8 of 8 each; with it, 120 of 120.
    • The agc_driver_native_depth, agc_driver_depth_ and agc_driver_native_multisample tests pass 10 runs in a row. Linux: 35 run, 34 pass, 1 skip (agc_driver_native_depth_bda_clear, as in earlier runs), 0 fail; the before arm, 3c22496168, fails agc_driver_native_depth_aliased_depth. Windows: 35 run, 1 pass, 34 skip (no Vulkan device), 0 fail.
    • Suites: libc and libkernel pass on Linux (144 and 207) and on Windows (171 and 223). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • Validation (run): agc_driver_native_depth_aliased_depth and agc_driver_native_depth_aliased_stencil with VK_LAYER_KHRONOS_validation on one GitHub Linux runner, 2 run, 2 pass, 0 skip; the only VUID on either arm is VUID-VkDeviceCreateInfo-pNext-pNext, as in earlier runs. Windows skips both (no Vulkan device).
  • AMD GPUs, by @tablefrogpillow (comment): agc_driver_native_depth_aliased_depth with these two commits passes with cases checked=642 unavailable=0 on RX Vega 56 (GCN5), RX 7900 GRE (RDNA3) and the Ryzen 7 7800X3D iGPU (RDNA2), so the 2-, 4- and 8-sample variants ran on hardware. Dave the Diver (PPSA19115) on RX Vega 56, on a test branch with this PR and #9717: no depth-alias refusal and no crash; it reaches "Level has started", then climbs to 600 presents per 10 s (60 fps, 0 dropped) and holds it to the end of the 185 s run. Before, it threw within about 15 s.
  • 09b9d682a3, a merge of #9533's f39599c354, which merges main 19af7f44e4 (run, on 5c7cb36fce, a direct merge of main into this branch with the same tree). The one conflict, in NativeMultisampleDepth.cpp, is #9533's: #10368 (Ondra97) adds CheckStorageAliasRetirement to NativeMultisampleDepth.cpp next to the ClearFault enum #9533 extends with FillDuringClear and its ClearSource enum. Both are kept, and this PR's changed lines are the same. The agc_driver_native_depth, agc_driver_depth_ and agc_driver_native_multisample tests, with the other tests built from the files the merge changes, pass 10 runs in a row. Linux: 285 run, 274 pass, 11 skip, 0 fail. Windows: 304 run, 183 pass, 121 skip (no Vulkan device), 0 fail. With VK_LAYER_KHRONOS_validation loaded on both arms on Linux, the only VUID is VUID-VkDeviceCreateInfo-pNext-pNext, on both. Suites: libc and libkernel pass on Linux (145 and 210) and on Windows (172 and 231). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 97c707a4f1, a merge of #9533's a7697941f3, which merges main ccfb96757f (run). One conflict, in MultisampleTarget.cpp: #11307 (dantdmdarealguy) returns selectedView where this PR increments contents; the merge does both. This PR's changed lines over #9533 are the same. The aliased depth and stencil tests and the native depth tests ran 10 times with no failure. Linux: 8 run, 5 pass, 3 skip (agc_driver_native_depth_bda_clear, agc_driver_native_fmask, agc_driver_sample_order_grid_reference, as in earlier runs), 0 fail. Windows: 8 run, 0 pass, 8 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (166 and 264). On Windows libc passes (194), and libkernel passes 283 of 286: exec_arguments, guest_timed_join_import_libkernel_sys and guest_timed_join_import_libkernel_web fail at their setup in the verify's Windows build (FileNotFoundError starting the title, or copying the libraries they load), and pass in main's own Windows job at 1829def9bf (job). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • d1439b60b0, a merge of #9533's 5343d0a8da (run). It's #9533's fix for a whole HTILE or stencil-plane fill whose stores landed before its note (Co-authored-by: Tharun Balaji K, from sktharunbalaji13-cmd's finding on Ghost of Tsushima Director's Cut; see #9533).
    • The merge is clean, and this PR's own changed lines are the same.
    • The native depth tests ran 10 times with no failure. Linux: 12 run, 11 pass, 1 skip (agc_driver_native_depth_bda_clear, which skips on lavapipe), 0 fail. On Windows all 12 skip, because the runner has no Vulkan device, so they ran on Linux only. The libc and libkernel suites run 166 and 264 tests on Linux and 194 and 286 on Windows, with 0 failed. They ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • f8af4b2173, a merge of #9533's 6eb141ce5f, which merges main 102b7a5cf0 and with it Jamie's #12566 (run). The one conflict was the include block of MultisampleTarget.hpp: main's <utility> joins this PR's <atomic>, and both sides add <vector>. MultisampleTarget.cpp merged cleanly, with #12566's HostOnlySampleRanges next to this PR's MultisampleColorTargetOver and MultisampleColorTargetsOver. This PR's own diff is unchanged, apart from #include <vector>, which main now has too. The native depth and multisample tests (^agc_driver_native_) and agc_frame_capture ran 10 times with no failure. Linux: 15 run, 13 pass, 2 skip, 0 fail. Windows: 15 run, 1 pass, 14 skip, 0 fail; the 14 skip because the runner has no Vulkan device. The libc and libkernel suites run 193 and 294 tests on Linux and 223 and 317 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • Validation comparison at f8af4b2173 (CONTRIBUTING's AGC rule). 426f5d4ffd changes only the debt file. The comparison on current main, at 1c904e29a2, is the last bullet.
    • Arms: main 102b7a5cf0, that head's base, against f8af4b2173. Since then main has changed only libSceAgcDriver/CMakeLists.txt and the debt file among this PR's paths.
    • Setup: GitHub's Linux runner (llvmpipe (LLVM 20.1.2), Mesa 25.2.8, Ubuntu 24.04.5), with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1 and ctest -V.
    • The native tests (run): every test matching ^agc_driver_native_, 14 run, 12 pass, 2 skip (as in this PR's earlier runs on that runner), 0 fail. main's arm ran the ones it has, and they pass.
    • The layer: the loader inserted VK_LAYER_KHRONOS_validation 15 times on main and 27 with the change, and neither log has was not found. Both logs report only VUID-VkDeviceCreateInfo-pNext-pNext, and the change adds none.
    • agc_driver_sample_multisample_target: it passes on both arms, with no new VUIDs (run). ×10 on f8af4b2173 (run): Linux 10 of 10; Windows skips, since the runner has no Vulkan device.
    • Windows: the tests build and skip, since the runner has no Vulkan device. The libc and libkernel suites run 193 and 294 tests on Linux and 223 and 317 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 426f5d4ffd, the debt entries (docs only; the code's patch-id is unchanged):
    • This PR's colour-alias text moves out of #9533's "Native multisampled depth sampling" entry, which is #9533's text again, into two entries of its own.
    • Those are 786 and 420 characters, and the first states the unmeasured console behaviour first.
    • check_conventions.py has no errors, and its one remaining debt-length warning is #9533's entry, unchanged from 6eb141ce5f.
    • CI's conventions job passes on 426f5d4ffd (run).
  • 1c904e29a2, a merge of main 42d992b02a (clean; this PR's own diff is unchanged). That main brings milescoviello's #10854 (a079dec978), which adds OverwrittenOnGpu() to the DepthSurfaceTexture condition in DepthSurface.cpp.
    • ×10 (run): every ^agc_driver_native_ test, plus agc_driver_sample_multisample_target and agc_frame_capture. Linux: 16 run, 14 pass, 2 skip (agc_driver_native_depth_bda_clear and agc_driver_native_fmask), 0 fail. Windows: 16 run, 1 pass, 15 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 198 and 304 tests on Linux and 225 and 326 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • Validation comparison (run): main 42d992b02a against 1c904e29a2, the same tests, on GitHub's Linux runner (llvmpipe (LLVM 20.1.2), Mesa 25.2.8) with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1 and ctest -V. The loader inserted the layer 16 times on main and 28 with the change, and neither log has was not found. Both logs report only VUID-VkDeviceCreateInfo-pNext-pNext, and the change adds none.
  • Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, at this head (comment): main 98ddd9c179 + #12840 425cd9d8b0 + #9742 1c904e29a2 (#9533's 6eb141ce5f inside), merged cleanly; Linux, RTX 4070 Ti (NVIDIA 615.71.09), release libraries, 21 GiB cap, booting from a settings save. No depth-plane alias refusal, and no native multisample stencil or depth format import stop. The run stops 33 s in, at the next check in compute shader 0x20001ef700, native multisample depth sampled identity or format mismatch, which #9717 takes. With #9717 added (comment), the next stop is vkAllocateMemory sampled depth shadow: Vulkan result -2, out of device memory with device-local heap 0 at 10,625 of 10,654 MiB, on a base before #13064.
  • 658b3e7df8, a merge of #9533's dcf420ec7f, which brings #9533's merge of main 2b1ae87c69 and savvaniss's #8223 (run). Clean; this PR's own diff changes only in #9533's guardedColorBytes position.
    • ×10: the multisample target, frame capture, ^agc_driver_native_, ^agc_driver_msaa_ and ^agc_driver_depth_ tests.
      • Linux: 57 run, 49 pass, 8 skip, 0 fail.
      • Windows: 57 run, 4 pass, 53 skip (no Vulkan device), 0 fail.
      • The libc and libkernel suites run 199 and 307 tests on Linux and 226 and 329 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • On a cloud Linux machine (lavapipe): ctest -R '^(agc|shader)' 1,162 passed, 0 failed.
  • 1694dc0fd9, a merge of #9533's 071ca5b609, which merges main 6a691f69ee and with it Celegans12's #8105 (run, validation run). #9533's resolution, with its two test-file adaptations, is kept as is.
    • The one conflict: CMakeLists.txt, where agc_driver_native_depth_buffer_clear joins this PR's set_tests_properties lists, which also carry agc_driver_native_depth_aliased_depth. Those two lines are the only change to this PR's own lines over #9533.
    • ×10: agc_driver_native_multisample_depth, agc_driver_sample_multisample_target and every ^agc_driver_native_depth or ^agc_driver_depth_plane test, agc_driver_native_depth_aliased_depth and agc_driver_native_depth_buffer_clear included.
      • Linux: 25 run, 24 pass, 1 skip, 0 fail.
      • Windows: 25 run, 0 pass, 25 skip (no Vulkan device), 0 fail.
      • The libc and libkernel suites run 199 and 308 tests on Linux and 226 and 330 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • Validation (VERIFY_VALIDATION=1 on GitHub's Linux runner), main 6a691f69ee against this head, the same tests: main's arm ran the ones it has, and both pass. The loader inserted VK_LAYER_KHRONOS_validation 28 times on main and 40 with this head, and neither log has was not found. Both report the same three IDs, VUID-VkDeviceCreateInfo-pNext-pNext, VUID-vkCmdCopyImage-srcImage-01548 and VUID-vkCmdCopyImage-srcImage-01551, so the merge adds none.
    • On a cloud Linux machine (lavapipe): this PR's 12 tests from agc_driver_native_multisample_depth_tests pass 120 of 120 runs; ctest -R '^(agc|shader)' 1,091 passed, 75 skipped, 0 failed.
  • d359d92d02, a merge of #9533's merge of main 0836dfdf4f (run, on f3ee9e9725, which has the same tree). #12862 moved libSceAgcDriver's test registrations into tests/cmake/; the conflict in CMakeLists.txt is resolved with tools/agc_test_split.py resolve, which moves this PR's registration into tests/cmake/agc_driver_native_multisample_depth_tests.cmake (+3 −2 against #9533's merge). Nothing else conflicted. Apart from the move, this PR's diff is unchanged. With -DBUILD_TESTING=ON, ctest -N gives 3082 tests: main's 3075 plus this PR's and #9533's 7 tests, each listed once. The 25 tests of this PR's verify set pass 10 runs in a row. Linux: 25 run, 24 pass, 1 skip, 0 fail. Windows: 25 run, 0 pass, 25 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (199 and 308) and on Windows (226 and 330). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • b3a54b169f, a merge of main 88e804b0a7 (run), which has #9533 and #9717. The three conflicts were both PRs' additions at the same places, and the merge keeps both: #9717's CheckStencilView with its --stencil-view case and this PR's CheckAliasedDepth with its case in NativeMultisampleDepth.cpp, both tests in the tests/cmake/agc_driver_native_multisample_depth_tests.cmake lists, and this PR's two debt entries after #9717's reworded sampling entry. This PR's changed lines are the same, except that those two cmake lists now also name #9717's agc_driver_native_depth_stencil_view. The 26 tests of this PR's verify set pass 10 runs in a row. Linux: 26 run, 25 pass, 1 skip, 0 fail. Windows: 26 run, 0 pass, 26 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (210 and 310) and on Windows (237 and 331). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners. TechLevelZero's NVIDIA bot ran this head merged onto main 88e804b on an RTX 2000 Ada (report): 2,550 passed, 5 failed, none new (3 also fail on main, 2 unstable on main), 45 skipped, with no new validation IDs (971 tests on the GPU). Its AMD bot ran it merged onto main 7feb37e on a Radeon RX 6300 (RADV NAVI24, Mesa 25.2.8; report): 2,710 passed, 9 failed, none new (8 also fail on main, 1 unstable on main), 58 skipped, with no new validation IDs (928 tests on the GPU).
  • Ghost of Tsushima Director's Cut (PPSA02225), by @xXPBSXx, at this head on current main (comment): Windows, NVIDIA GeForce RTX 4080 SUPER (16 GB, driver 32.0.16.1074), one 600 s run per arm, with all libraries rebuilt for each. On main f6232fcfda, the run ends 24 s after the process starts, on the alias refusal (native multisample depth or HTILE aliases a multisampled colour target whose samples are only on the host). With b3a54b169f merged onto the same main, that refusal doesn't occur, and the run ends 9 min 21 s in, on the next stop: sample-preserving guest publication of native multisample depth is not implemented (compute shader 0x20001f3500). A run of each arm under a locally built validation layer stopped inside the layer at start-up, so it gives no validation result.
  • 69d9d231c6, a merge of main 4f41f4c375 (run).
    • The conflicts: tests/cmake/agc_driver_native_multisample_depth_tests.cmake, where main adds agc_driver_native_depth_uniform_planes to the two set_tests_properties lists that carry this PR's agc_driver_native_depth_aliased_depth; the resolution is the union of the names, each once. And docs/dev/debt/libSceAgcDriver.md, where this PR's two entries and main's new entries are adjacent, and both stay.
    • This PR's own lines are unchanged apart from those two list lines, which now carry main's name too.
    • ×10: every test matching ^agc_driver_native_depth, ^agc_driver_native_multisample or ^agc_driver_sample_multisample. Linux: 16 run, 15 pass, 1 skip (agc_driver_native_depth_bda_clear, expected on lavapipe), 0 fail. Windows: 16 run, 0 pass, 16 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 300 and 322 tests on Linux and 327 and 342 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • GPUs: TechLevelZero's bots ran this head merged onto main 4f41f4c. NVIDIA RTX 2000 Ada (driver 595.99.02; report): 2,746 passed, 6 failed, none new (3 also fail on main, 3 unstable on main), 48 skipped, with no new validation IDs (924 tests on the GPU). AMD Radeon RX 6300 (RADV NAVI24, Mesa 25.2.8; report): 2,739 passed, 5 failed, none new (all 5 also fail on main), 56 skipped, with no new validation IDs (979 tests on the GPU).
  • 9b5252fa33 and 5ca95d6cb0, for XairRrR's two open points (review).
    • 9b5252fa33 (DepthSurface.cpp): sameDepthAlias compared the colour alias's fill count only through the refill rule, which needs a recorded clear. A colour target recorded with unknown contents (a fill over half its range before the import) that took another such fill after it kept its newest content, value and contents, so the next sample reused the import, where the debt entry says it refuses. The fill count must now match unless the refill rule accepts the fills. The aliased-depth test gains that case, UnknownThenPartialFill, which expects the refusal.
    • 5ca95d6cb0 (test-only): agc_driver_native_depth_aliased_depth ran every HTILE layout at 2, 4 and 8 samples in one ctest entry, about 640 cases on hardware with all three. XairRrR's review notes that it timed out under TechLevelZero's NVIDIA bot's parallel validation run at heads 426f5d4 through b3a54b1, and passed there only on retry. It now runs as three entries, one per HTILE layout: agc_driver_native_depth_aliased_depth_depth_only, agc_driver_native_depth_aliased_depth_stencil and agc_driver_native_depth_aliased_depth_no_stencil.
    • Red: c6de43b107, the split test without the new fill-count condition. On GitHub's Linux runner all three entries pass case 26 and fail at the new case 27 with "multisample target refusal did not match" (run).
    • ×10 (run): every test matching ^agc_driver_native_depth, ^agc_driver_native_multisample or ^agc_driver_sample_multisample. Linux: 18 run, 17 pass, 1 skip (agc_driver_native_depth_bda_clear, expected on lavapipe), 0 fail; each of the three new entries takes under 0.5 s on lavapipe. Windows: 18 run, 0 pass, 18 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 300 and 322 tests on Linux and 327 and 342 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • a8c64b9c3b, a merge of main 04a9eb4fa2, which brings JAB-dev's #13021 (run).
    • The conflicts, all with #13021:
      • MultisampleTarget.hpp: this PR's MultisampleColorTargetsOver declaration and #13021's WithMultisampleTargetsLockForTest both stay.
      • MultisampleTarget.cpp: #13021 takes the targets lock through TargetsLock, which marks it held for HoldsMultisampleTargetsLock, so native depth publication refuses while it's held. This PR's MultisampleColorTargetsOver now takes the lock the same way, in place of a plain std::lock_guard.
      • docs/dev/debt/libSceAgcDriver.md: #13021's guest publication entry and its edit of the depth sampling entry, which drops guest publication from what remains unimplemented, stay, followed by this PR's two colour-target entries.
    • Apart from that lock line, this PR's diff over main is unchanged.
    • ×10: every test matching ^agc_driver_native_depth, ^agc_driver_native_multisample or ^agc_driver_sample_multisample, which now takes in #13021's agc_driver_native_depth_publication. Linux: 19 run, 18 pass, 1 skip (agc_driver_native_depth_bda_clear, expected on lavapipe), 0 fail. Windows: 19 run, 0 pass, 19 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 300 and 324 tests on Linux and 330 and 342 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.

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: #15443 (merge order only); #13021, #9533 and #9717 have merged (#6044 was closed, and #8115 and #8121 merged; see Overlap); #10882 (orezraey) goes after this PR (merge order only, on #10882)
  • Fixes: none (related: #5166)
  • Unblocks: Ghost of Tsushima Director's Cut (PPSA02225) #4461: this PR clears the depth-plane alias stop on #9533. With #9717, #8115 and #8121 as well, the title reaches its brightness calibration screen and intro, with no refusal or crash through the 600 s limit, warm and cold (milescoviello's run, comment). Later runs on that host ended at the memory cap, the latest at 493 s on current main, after a 3D scene (see Tested).
  • GPUs tested: NVIDIA GeForce RTX 3070 Laptop GPU (617.42, Windows 11); Mesa llvmpipe (LLVM 20.1.2), Ubuntu 24.04, on GitHub's Linux runner and a cloud Linux machine; NVIDIA GeForce RTX 4070 Ti (615.71.09), Linux, in milescoviello's title runs; AMD Radeon RX 6400, Windows, in xXPBSXx's title runs; NVIDIA GeForce RTX 4080 SUPER, Windows, in xXPBSXx's title run
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4966789162 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9742). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T11:43:57Z. --- ### What #9533 and #9717 have merged (2026-11-02), so this PR's diff is now only its own change on `main`. Ghost of Tsushima Director's Cut (PPSA02225) stops at the import of a native multisampled D32S8 target on #9533 ([milescoviello's run](https://github.com/boykopovar/AnyPS5/pull/9533#issuecomment-6337725902), warm and cold). The title has an R32F 2-sample colour target over the target's depth plane, last cleared to 0: ``` native multisample depth 0x1544ed0000+0x1fe0000 aliases multisampled colour target ... (vk format 100, 2 samples), newest clear 0 AGC graphics: native multisample depth or HTILE aliases a multisampled colour target whose samples are only on the host ``` Dave the Diver (PPSA19115) stops at the same import on a test branch with #9717 ([tablefrogpillow's run](https://github.com/boykopovar/AnyPS5/issues/7608#issuecomment-6395652467)): a two-sample D32S8 target whose HTILE carries its stencil (not depth-only), with one two-sample R32F colour target over the depth plane, newest a clear to 0, and `DB_DEPTH_CLEAR` 0.0. This PR now accepts that case at import; a Dave the Diver run on this branch is still pending, so this PR doesn't yet claim the game gets past the stop. **Why the colour target's samples aren't needed:** - Before the sample, the title fills the whole HTILE (0x50000 bytes) and the whole stencil plane (0x870000) with 0. - On a depth-only HTILE, the import already requires every HTILE word to prove the clear against `DB_DEPTH_CLEAR`, the title's own register. - Where every tile proves the clear, depth reads the clear value and never the plane's bytes. So the colour target over the depth plane can't change the imported depth, whatever it holds. **The change:** - **At import** (`prepareDepthSampling`): with a depth-only HTILE, or a pipe-aligned HTILE without VRS in the depth and stencil layout (the only other one the import admits), one multisampled colour target over the depth plane is accepted when it has the target's sample count. The HTILE check that follows still refuses unless every word proves `DB_DEPTH_CLEAR`; in the depth and stencil layout every word masked with `0xfffff00f` (Z range and ZMask) must be `0` for 0.0 or `0xfffc0000` for 1.0, the words of Mesa's `radv_get_htile_fast_clear_value`. The accepted target is recorded with its identity, a content counter (clears, recreates, draws, storage views) and its newest content. Its value isn't used. - **At every sample and stencil-tested bind** (`CheckCurrent`): it passes only while that recorded target is still the one colour target over the plane, unchanged, or changed only by a still-pending run of fills that each cover its whole guarded range with the recorded clear value, bit for bit. Dave the Diver (PPSA19115) fills it twice with 0 between two samples. A draw or clear into it, a partial fill or a fill of another value anywhere since the import, or a second colour target over the plane refuses with the existing text. - **A stencil in HTILE** is still proven only by HTILE: every word must hold SMem 0 at import and in a completed clear, and any colour target over the stencil plane still refuses. - **Unchanged:** HTILE aliases, the stencil-plane rule from #9533, and every other refusal. - **Debt:** two entries of this PR's own. "Native multisampled depth sampling under a colour target" says which depth-plane alias is accepted, with its unmeasured console behaviour first. "... over unproven tiles or the stencil plane" says what still refuses. #9533's "Native multisampled depth sampling" entry is unchanged. **Tests:** the regression controls follow JJenkx's review of the rule on #9533 ([comment](https://github.com/boykopovar/AnyPS5/pull/9533#issuecomment-6338020932)): matching vs mismatching depth clear, exact vs partial range, sample-count mismatch, and a draw after the clear. **Known risk:** a guest read of a target this PR newly accepts, or a resource the title creates over its memory, publishes the target. That publication refuses while the colour alias is resident (`native multisample depth publication over a resident colour target is not implemented`). Curved Space (PPSA02817) and New Joe & Mac: Caveman Ninja (PPSA02801) take the memory-reuse path on `main` with #9533's targets (JJenkx's prints in [D#8691](https://github.com/boykopovar/AnyPS5/discussions/8691#discussioncomment-19389239) and [D#9091](https://github.com/boykopovar/AnyPS5/discussions/9091#discussioncomment-19389232), after his bisect to a4b76b2c0a; [our reply](https://github.com/boykopovar/AnyPS5/discussions/8691#discussioncomment-19389356)). **Overlap:** checked with `git merge-tree` and the overlap tool. - **The stack:** this PR was built on #9533, which has merged, so #9533's overlaps are on `main` now. This PR's own commit adds nothing to them. With #8223, both conflicts (`DepthSurfaceView`'s signature and `guard()`) are #9533's own, and the same at 514643ab16. - **#9717** (the stencil view, also stacked on #9533): adjacent additions in `CMakeLists.txt`, `NativeMultisampleDepth.cpp` and the debt file. Keeping both sides resolves them. #9717 merged first, and the merge of `main` 88e804b0a7 (see Tested) keeps both PRs' additions. - **#9533's head**, which includes #7233 and #7371: merging 1d16d5029d (b39dbaecdb) needed only #9533's debt entry, where both sides' edits are kept, and 9afaa90c1f (39b338cf45) merged cleanly, and a45dff8d51 (9334be4972), #9533's merge of `main` with #6727, again needed only #9533's debt entry, where both sides' edits are kept. Merging 1582cf6cc0 (07007fdc45), #9533's queued-fill skip, needed only that entry once more, and both sides' words are kept. - **Other PRs touching `DepthSurface.cpp` or `MultisampleTarget.*`** (#9186, #8998, #9700 and #9672 to #9676, open; #8999, #8847 and #7705, merged since): this commit adds no conflict with any of them beyond what #9533 already has. - **#6044** (TaymKal) converts this file's test registrations to `add_library_test` and moves test files. The order is proposed in its thread ([comment](https://github.com/boykopovar/AnyPS5/pull/6044#issuecomment-6345718933)): this PR first; if #6044 lands first, `agc_driver_native_depth_aliased_depth` is registered with `add_library_test(graphics ...)` at this PR's next merge of `main`. - **#8115 and #8121** (milescoviello) handle the title's next two stops: one-sample colour targets beside a multisampled rasterizer, and a `PS_ITER_SAMPLE` program into a one-sample target. Each merges cleanly with this head and with #9533 (`git merge-tree` against 2620f8d62e and c974601a60), so no order is needed between them. - **#13021** (JAB-dev, native multisample D32S8 guest publication) merged first, as agreed in its thread. The merge of `main` 04a9eb4fa2 (see Tested) keeps both sides in `MultisampleTarget.hpp` and `.cpp` and in the AGC debt file: this PR's `MultisampleColorTargetsOver` takes #13021's `TargetsLock`, and the debt file keeps #13021's new entry and its edit of "Native multisampled depth sampling" beside this PR's two entries. In Ghost of Tsushima Director's Cut (PPSA02225), the run with this PR next stops on the publication line #13021 adds a D32S8 path in front of. - **#15443** (edubox, a depth plane aliased by a cleared R32F target, for 7th Guest (PPSA17019)) clears the same refusal at the same index. It takes the depth value from an R32F colour target whose newest clear or fill, in `[0, 1]`, covers exactly the depth plane: without HTILE, on the uniform-plane path this PR doesn't touch, and with HTILE when every word proves that value. - **Conflicts:** `DepthSurface.cpp`, in the index-0 branch of `prepareDepthSampling` and of `CheckCurrent`, and the test-list cmake. - **They compose as a union,** proposed in #15443's thread ([note](https://github.com/boykopovar/AnyPS5/pull/15443#issuecomment-6607527041)). At import, HTILE is checked against #15443's alias value first; failing that, this PR's sole-alias rule applies, with HTILE proving `DB_DEPTH_CLEAR`. In `CheckCurrent`, this PR's `sameDepthAlias` comes first, then #15443's value re-proof. - **One test step changes:** in #15443's `CheckHtileAliasedDepth`, the colour fill of 1.0 over HTILE words proving the target's own 0.0 is accepted and reads 0.0, so this PR's merge of `main` after #15443 turns that step into an accepted case. - **Merge order:** #15443 first, this one second. #15446, stacked on #15443, shares only the test list with this PR. - **`CMakeLists.txt` and the AGC debt file** are shared with many PRs, by neighbouring lines only. ### Tested - **Linux, Mesa llvmpipe** (which runs 4 samples). The new `agc_driver_native_depth_aliased_depth` has 10 cases at `DB_DEPTH_CLEAR` 0.0 and 1.0 on a D32S8 target with a separate stencil plane and a pipe-aligned depth-only HTILE: - **Accepted, sampling `DB_DEPTH_CLEAR` in every sample:** - an R32F alias cleared to another value (0.25); - an alias cleared to `DB_DEPTH_CLEAR`; - an alias over part of the plane; - an alias drawn before the import; - a second sample with nothing changed. - **Refused:** - one HTILE word not proving the clear, and HTILE words proving the other clear value: "initial HTILE does not prove its clear value"; - after the import, a draw into the alias, or a new colour target over the plane: the alias text. - **Red:** with `DepthSurface.cpp` and `MultisampleTarget.*` at #9533's head, the three acceptance cases fail with "native multisample depth or HTILE aliases a multisampled colour target whose samples are only on the host". - **GitHub's runners** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39767419140)): - **Linux:** the new test fails on #9533's head in all 3 runs, and the nine native depth tests pass 10 times each with the change. - **Windows:** the runner builds it, and its Vulkan tests skip there. - **CI's Linux job mirrored** on a cloud Linux machine: the only failures are the machine's three IPv6 tests. - **Validation layer, #9533 (514643ab16) against this PR** (CONTRIBUTING's AGC rule), on one GitHub Linux runner ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39767565492)): - **Setup:** both runs used `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1` and `ctest -V`. The device was llvmpipe (LLVM 20.1.2) on Mesa 25.2.8, Ubuntu 24.04.5. - **The tests:** the nine native depth tests, named explicitly. #9533's tree has eight of them. - **The layer:** the loader inserted `VK_LAYER_KHRONOS_validation` 16 times on #9533's tree and 18 with this PR. Neither log has `was not found but was requested by env var VK_INSTANCE_LAYERS`. - **The messages:** both logs report only `VUID-VkDeviceCreateInfo-pNext-pNext`. This PR adds no `VUID-` message. - **`check_conventions.py`:** no errors and no comment lines added. One warning, `debt-length`, on #9533's native multisampled depth entry, which was already over the limit. - **NVIDIA GeForce RTX 3070 Laptop GPU** at 082ef25d86, the #9533, #9742 and #9717 stack before the #6727 merge (driver 617.42, Windows 11, WinLibs GCC 15.2.0, Release, `ANYPS5_REQUIRE_VULKAN=1`; GPU clocks weren't held, pass/fail only): `agc_driver_native_depth_aliased_depth` passes 5 of 5 at 2, 4 and 8 samples, 66 cases per run with none unavailable. So the 2- and 8-sample cases and the sample-count control (colour targets at the other two counts) run there, which lavapipe, with only 1 and 4 samples, can't. #9533's own native depth tests pass there too, except `agc_driver_native_depth_driver_queued_fill`: on Windows that queued fill refuses, as on `main`, and #9533 now skips the case there with the reason (1582cf6cc0; see #9533). - **Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello**, on 219e925509 ([comment](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6343190451)): Linux, RTX 4070 Ti, NVIDIA 615.71.09, release libraries, 16 GB cap, warm and cold. - Warm: the import prints the depth-plane alias line and accepts it. The run stops at 14 s in the same compute shader on `native multisample depth sampled identity or format mismatch`. That looks like the per-sample stencil-plane read #9717 covers: @dantdmdarealguy's Windows run with #9717 got past it ([#5166](https://github.com/boykopovar/AnyPS5/issues/5166#issuecomment-6339577141)). - Cold: a SIGSEGV at 16 s with no message before it, in one run. The log ends on trophy statistics and shader cache counters, so it can't yet be tied to this change. - **Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, with #9717 too**, on the test branch `test/ghost-9742-9717` (3ec696f7fe: this PR's 219e925509 and #9717's 767374011f, both on 514643ab16; [comment](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6344352615)). Same setup, warm at 16 GB and cold at 20 GB. - Warm reaches 246 s and cold 254 s, with no native multisample depth or stencil refusal. The alias line is printed once and the import is accepted. - Both stop at `a color target's sample count differs from the rasterizer's`, which milescoviello's #8115 handles. - The cold SIGSEGV didn't recur. milescoviello places it in the shader recompiler's `MaskedSelectEliminator::Eliminate`, not in this PR's code. - **b39dbaecdb, #9533's head 1d16d5029d merged in** (only #9533's debt entry needed resolving, and both sides' edits are kept there; outside it, this PR's own changes are the same by `git diff -U0` patch-id), on GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39806136664)): - **Linux:** the 13 native depth, DCC clear and pipelined DMA tests and this PR's `agc_driver_native_depth_aliased_depth` pass 10 of 10, none skipped. The run was in validation mode, whose base arm builds #9533's own tree and runs only the 13 tests it has, so the red for `agc_driver_native_depth_aliased_depth` is the one in the first GitHub run above. - **Validation, #9533's head against this PR**, in the same run: the loader inserted `VK_LAYER_KHRONOS_validation` 21 times on #9533's tree and 230 with this PR, and neither log has `was not found`. Both logs report only `VUID-VkDeviceCreateInfo-pNext-pNext`, so this PR adds no `VUID-` message. - **Windows:** the runner builds them, and 13 Vulkan tests skip there. - **Suites:** libc and libkernel pass on both runners. The libc and libkernel suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Validation, `main` b7d1d47a5f against b39dbaecdb** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39806266178)), the same 14 tests once on one GitHub Linux runner. `main`'s tree ran the 7 of them it has. The loader inserted `VK_LAYER_KHRONOS_validation` 11 times on `main` and 23 with this head, and neither log has `was not found`. Both logs report only `VUID-VkDeviceCreateInfo-pNext-pNext`, so the stack adds no `VUID-` message against `main`. - **Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, with #9717, #8115 and #8121** ([comment](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6346148575)): the test branch `test/ghost-9742-9717` (3ec696f7fe) with milescoviello's #8115 and #8121 merged on top, both clean; Linux, RTX 4070 Ti, NVIDIA 615.71.09, release libraries, 20 GiB cap, warm and cold. - With #8115 alone, the sample-count stop is gone, and warm (146 s) and cold (267 s) stop at `a one-sample color target under a multisampled rasterizer without MSAA_ENABLE is unsupported with PS_ITER_SAMPLE, a sample index or coverage input, or a sample-mask export`, which #8121 handles. - With #8115 and #8121, warm and cold both reach the 600 s limit with no refusal and no crash. In milescoviello's words, the game shows its brightness calibration screen, with the mask rendered correctly, and then its intro. The only native depth line is this stack's alias line, printed once and accepted. - The limits they report on that host: about 1.3 FPS on the brightness screen, with queue 0 the bottleneck; and two later warm runs killed at the 20 GiB cap, at 266 s and 478 s. - With #8213 and #8608 also merged, two of milescoviello's runs reach a 3D sampled view about 9 minutes into the opening (4781 MiB, of which 157 of its 900 slices lie inside a 2438 MiB guest allocation) and end at the 20 GiB cap, at 572 s and 563 s ([comment](https://github.com/boykopovar/AnyPS5/pull/9318#issuecomment-6353408402)). That view isn't a native depth view, so it's outside this stack's changes. - **39b338cf45, #9533's head 9afaa90c1f merged in** (`main` 11f976b27c; clean, and this PR's own changes are the same by `git diff -U0` patch-id), on GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39821312236)): - **Linux:** the 13 native depth, DCC clear and pipelined DMA tests and `agc_driver_native_depth_aliased_depth` pass 10 of 10, none skipped. - **Validation, `main` against this head**, in the same run: `main`'s tree ran the 7 of these tests it has. The loader inserted `VK_LAYER_KHRONOS_validation` 11 times on `main` and 230 with this head, and neither log has `was not found`. Both logs report only `VUID-VkDeviceCreateInfo-pNext-pNext`, so this PR adds no `VUID-` message. - **Windows:** the runner builds them, and the Vulkan tests skip there. - **Suites:** libc and libkernel pass on both runners. The libc and libkernel suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **9334be4972, #9533's head a45dff8d51 merged in** (`main` d6e7ab42df, which brings #6727; this PR's own changes are the same by `git diff -U0`), on GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39845594845)): - **Linux:** the 13 native depth, DCC clear and pipelined DMA tests and `agc_driver_native_depth_aliased_depth` pass 10 of 10, none skipped. #9533's `agc_driver_native_depth_stencil` fixture now notes a host write before its refusal checks, as #6727's own fixtures do, because #6727 retires an unwritten native multisample depth surface on a guest read instead of refusing it ([#6727](https://github.com/boykopovar/AnyPS5/pull/6727)). That line is in #9533's merge. - **Validation, `main` against this head**, in the same run: `main`'s tree ran the 7 of these tests it has. The loader inserted `VK_LAYER_KHRONOS_validation` 11 times on `main` and 230 with this head, and neither log has `was not found`. Both logs report only `VUID-VkDeviceCreateInfo-pNext-pNext`, so this PR adds no `VUID-` message. - **Windows:** the runner builds them, and the Vulkan tests skip there, so its lines are the suites only. - **Suites:** libc and libkernel pass on both runners. The libc and libkernel suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **07007fdc45, #9533's head 1582cf6cc0 merged in** (#9533's queued-fill skip; this PR's own changes outside #9533's debt entry are the same by `git diff -U0`, and that entry keeps every word of both sides), on GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39855336406)): - **Linux:** the 13 native depth, DCC clear and pipelined DMA tests and `agc_driver_native_depth_aliased_depth` pass 10 of 10, none skipped. - **Validation, `main` against this head**, in the same run: `main`'s tree ran the 7 of these tests it has. The loader inserted `VK_LAYER_KHRONOS_validation` 11 times on `main` and 230 with this head, and neither log has `was not found`. Both logs report only `VUID-VkDeviceCreateInfo-pNext-pNext`, so this PR adds no `VUID-` message. - **Windows:** the runner builds them, and the Vulkan tests skip there, so its lines are the suites only. - **Suites:** libc and libkernel pass on both runners. The libc and libkernel suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **9fc4f50e1e, #9533's head 53886418d9 merged in** (#9533's test-only fix for jotitadev's macOS abort at exit; a clean merge, and this PR's own diff is unchanged by patch-id), on GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39898164017)): - **Linux:** `agc_driver_native_depth_aliased_depth` fails with #9533's code. With this PR it and the other native depth and native multisample depth tests pass 10 of 10, with `agc_driver_native_depth_bda_clear` skipping on llvmpipe, as on `main`. - **Windows:** the runner builds the 12 tests and skips them, since it has no Vulkan device. - **Suites:** libc and libkernel pass on both runners (116 and 198 on Linux, 143 and 208 on Windows). They ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **d658354769, a merge of #9533's de4cee5626, which merges `main` 0db47b263d.** No conflicts. On GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39931016071)), of the `agc_driver_native_depth*` and `agc_driver_native_multisample_depth*` tests (12 tests), 11 pass 10 runs in a row on Linux and 1 skips: `agc_driver_native_depth_bda_clear`, `main`'s test, because the device doesn't keep guest write watching for its native clear imports. On Windows all 12 build and skip, as the runner has no Vulkan device. The libc and libkernel suites pass on both, run with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. An earlier run linked here didn't run this set, so it's replaced. - **b3e6311c1f, a merge of #9533's 55b0a5f4ad, which merges `main` 3fcb5e4d76 and with it #8999.** No conflicts. On GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40110115761)), the native, depth and multisample tests (`^agc_driver_native_`, `^agc_driver_depth_`, `^agc_driver_msaa_`) pass 10 runs in a row on Linux: 43 run, 39 pass, 4 skip (`agc_driver_native_fmask`, `agc_driver_msaa_dcc_clear_2` and `_8`, and `agc_driver_native_depth_bda_clear`), 0 fail. On Windows 43 run, 3 pass 10 runs in a row and 40 skip without a Vulkan device, 0 fail. The libc and libkernel suites pass on both (142 and 204 tests on Linux, 169 and 217 on Windows), run with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Ghost of Tsushima Director's Cut (PPSA02225), by @xXPBSXx** ([comment](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6361768346)): Windows, AMD Radeon RX 6400, one run per state, all libraries rebuilt for each. On `main` 17f5335562 it stops on `native multisample stencil or depth format import is not implemented`; with #9533, on the CPU read over a multisampled colour target that milescoviello reported on #9533. With this PR on a later `main`, that stop is gone, and the run stops later in the same compute shader, 0x20001ef700, on `native multisample depth sampled identity or format mismatch`, as in milescoviello's Linux run above. - **Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, at this head on current `main`** ([comment](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6389031723)): `main` 2dc85609fc with #9717 (and #9533 under it), this PR's b3e6311c1f (its conflicts with #9717 in `CMakeLists.txt`, the test and the debt file taken from #9717's side; the library code is this PR's), #9129, #10064, #10727 (with #10685) and #10473. Linux, RTX 4070 Ti (NVIDIA 615.71.09), release libraries, warm shader and pipeline caches, one run with cross pressed periodically. - **Without this PR**, `main` with #9533 and #9717 on the same base stops at 40 s on `native multisample depth or HTILE aliases a multisampled colour target whose samples are only on the host`. - **With it**, the log has no refusal and no `is not implemented` line, and the alias this PR accepts is logged once (`native multisample depth 0x1544ed0000+0x1fe0000 aliases multisampled colour target 0x1544ed0000+0x1fe0000 (vk format 100, 2 samples), newest clear 0x00000000 ...`). The screenshots show black frames at 2 to 4 min, the mask screen at about 6 min and a letterboxed 3D night scene at about 8 min. The run ended at 493 s on its 19 GB memory cap, not on an error, with 8.5 GB of anonymous and 10.7 GB of shared guest memory resident and the device-local heap full. - **b991bae852, a merge of #9533's merge of `main` (f7569e7ce1)** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40187497353)). No conflict of its own; this PR's diff over #9533 is unchanged. The `agc_driver_native_`, `agc_driver_depth_` and `agc_driver_msaa_` tests pass 10 runs in a row. Linux: 43 run, 39 pass, 4 skip (the 2- and 8-sample DCC clears, as lavapipe has no 2- or 8-sample colour, and `agc_driver_native_depth_bda_clear` and `agc_driver_native_fmask`, which skip on that runner as in earlier runs), 0 fail. Windows: 43 run, 3 pass, 40 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (144 and 207) and on Windows (171 and 223). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **4ef2217dba, the stencil-in-HTILE commit** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40194217686)), on b991bae852. `agc_driver_native_depth_aliased_depth` now runs every alias case with the stencil in HTILE (words `0xf0` and `0` for 0.0, `0xfffc00f0` for 1.0) and with a D32 target in the depth and stencil layout, plus a word with SMem 1 and a colour target over the stencil plane, which refuse. - Red/green, per case, with a harness linking each library (b3e6311c1f before, this commit after): the 60 new layout cases refuse with the depth-alias refusal before and pass after; the SMem and stencil-plane cases refuse both times, but with their own refusals only after, since before it the depth alias refuses first. - The `agc_driver_native_depth` and `agc_driver_depth_` tests, 10 runs in a row. Linux: 34 run, 33 pass, 1 skip (`agc_driver_native_depth_bda_clear`, as in earlier runs), 0 fail; the before arm fails `agc_driver_native_depth_aliased_depth`. Windows: 34 run, 1 pass, 33 skip (no Vulkan device), 0 fail. - Suites: libc and libkernel pass on Linux (144 and 207); on Windows libc passes (171) and libkernel's `guest_raise_in_system_call` timed out at 30 s, as it did in the same run's `main` arm (222 of 223 pass). This PR changes nothing in libkernel. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - Validation ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40186052849)), the same commit on b3e6311c1f (same patch-id): `agc_driver_native_depth_aliased_depth` and `agc_driver_native_depth_aliased_stencil` with `VK_LAYER_KHRONOS_validation` on both arms; the only VUID is `VUID-VkDeviceCreateInfo-pNext-pNext`, on both. - **3c22496168, a merge of #9533's head 078e6a68d8** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40198589353)). It takes #9533's merge of `main`, which brings in #9186's host-only flag for `guard()`. No conflict here. The `agc_driver_native_`, `agc_driver_depth_`, `agc_driver_msaa_` and `agc_driver_sample` tests pass 10 runs in a row. Linux: 56 run, 50 pass, 6 skip (`agc_driver_msaa_dcc_clear_2`, `agc_driver_msaa_dcc_clear_8`, `agc_driver_native_depth_bda_clear`, `agc_driver_native_fmask`, `agc_driver_sample_order_grid_reference`, `agc_driver_sample_order_recipe_depth_locations`), 0 fail. Windows: 56 run, 5 pass, 51 skip (no Vulkan device), 0 fail. The before arm, `main` with this PR's tests, doesn't build. Suites: libc and libkernel pass on Linux (144 and 207) and on Windows (171 and 223). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **2c0814e5ee and 284d3a643b, the same-value fill commits** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40219661236)), on 3c22496168. Dave the Diver (PPSA19115) fills the colour target over its depth plane with its recorded clear value between two samples, twice, and each fill refused the alias. 2c0814e5ee keeps the alias after one such fill and counts the fills a target notes; 284d3a643b keeps it through a run of them. `agc_driver_native_depth_aliased_depth` gains 15 cases in each of the 8 HTILE layouts: - **Accepted:** one, two and three whole-range fills of the clear value. - **Refused:** a fill of another value, of -0.0 over 0.0, of a NaN, of half the target or short of its guarded range; a partial or other-value fill before the same-value one; a draw before the fill; a guest HTILE write; and the runs same, other, same, then same, partial, same, then same, draw, same. - Red/green, per case, on lavapipe (4 samples), measured on the fork's copies of these two commits (the same patch-ids): before 2c0814e5ee, 64 of its 80 new sub-cases pass, with the same-value fill and the HTILE-write case failing 8 of 8 each (the HTILE case refuses at the alias check instead of the guest-write check); with it, 80 of 80. Before 284d3a643b, 104 of the 120 sub-cases of the 15 cases pass, with the two- and three-fill cases failing 8 of 8 each; with it, 120 of 120. - The `agc_driver_native_depth`, `agc_driver_depth_` and `agc_driver_native_multisample` tests pass 10 runs in a row. Linux: 35 run, 34 pass, 1 skip (`agc_driver_native_depth_bda_clear`, as in earlier runs), 0 fail; the before arm, 3c22496168, fails `agc_driver_native_depth_aliased_depth`. Windows: 35 run, 1 pass, 34 skip (no Vulkan device), 0 fail. - Suites: libc and libkernel pass on Linux (144 and 207) and on Windows (171 and 223). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - Validation ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40219730818)): `agc_driver_native_depth_aliased_depth` and `agc_driver_native_depth_aliased_stencil` with `VK_LAYER_KHRONOS_validation` on one GitHub Linux runner, 2 run, 2 pass, 0 skip; the only VUID on either arm is `VUID-VkDeviceCreateInfo-pNext-pNext`, as in earlier runs. Windows skips both (no Vulkan device). - **AMD GPUs, by @tablefrogpillow** ([comment](https://github.com/boykopovar/AnyPS5/issues/7608#issuecomment-6401150419)): `agc_driver_native_depth_aliased_depth` with these two commits passes with `cases checked=642 unavailable=0` on RX Vega 56 (GCN5), RX 7900 GRE (RDNA3) and the Ryzen 7 7800X3D iGPU (RDNA2), so the 2-, 4- and 8-sample variants ran on hardware. Dave the Diver (PPSA19115) on RX Vega 56, on a test branch with this PR and #9717: no depth-alias refusal and no crash; it reaches "Level has started", then climbs to 600 presents per 10 s (60 fps, 0 dropped) and holds it to the end of the 185 s run. Before, it threw within about 15 s. - **09b9d682a3, a merge of #9533's f39599c354, which merges `main` 19af7f44e4** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40292019772), on 5c7cb36fce, a direct merge of `main` into this branch with the same tree). The one conflict, in `NativeMultisampleDepth.cpp`, is #9533's: #10368 (Ondra97) adds `CheckStorageAliasRetirement` to `NativeMultisampleDepth.cpp` next to the `ClearFault` enum #9533 extends with `FillDuringClear` and its `ClearSource` enum. Both are kept, and this PR's changed lines are the same. The `agc_driver_native_depth`, `agc_driver_depth_` and `agc_driver_native_multisample` tests, with the other tests built from the files the merge changes, pass 10 runs in a row. Linux: 285 run, 274 pass, 11 skip, 0 fail. Windows: 304 run, 183 pass, 121 skip (no Vulkan device), 0 fail. With `VK_LAYER_KHRONOS_validation` loaded on both arms on Linux, the only VUID is `VUID-VkDeviceCreateInfo-pNext-pNext`, on both. Suites: libc and libkernel pass on Linux (145 and 210) and on Windows (172 and 231). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **97c707a4f1, a merge of #9533's a7697941f3, which merges `main` ccfb96757f** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40638395155)). One conflict, in `MultisampleTarget.cpp`: #11307 (dantdmdarealguy) returns `selectedView` where this PR increments `contents`; the merge does both. This PR's changed lines over #9533 are the same. The aliased depth and stencil tests and the native depth tests ran 10 times with no failure. Linux: 8 run, 5 pass, 3 skip (`agc_driver_native_depth_bda_clear`, `agc_driver_native_fmask`, `agc_driver_sample_order_grid_reference`, as in earlier runs), 0 fail. Windows: 8 run, 0 pass, 8 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (166 and 264). On Windows libc passes (194), and libkernel passes 283 of 286: `exec_arguments`, `guest_timed_join_import_libkernel_sys` and `guest_timed_join_import_libkernel_web` fail at their setup in the verify's Windows build (`FileNotFoundError` starting the title, or copying the libraries they load), and pass in `main`'s own Windows job at 1829def9bf ([job](https://github.com/boykopovar/AnyPS5/actions/runs/40627345977/job/122615375186)). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **d1439b60b0, a merge of #9533's 5343d0a8da** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40897546091)). It's #9533's fix for a whole HTILE or stencil-plane fill whose stores landed before its note (`Co-authored-by: Tharun Balaji K`, from sktharunbalaji13-cmd's [finding](https://github.com/boykopovar/AnyPS5/issues/5166#issuecomment-6495502628) on Ghost of Tsushima Director's Cut; see #9533). - The merge is clean, and this PR's own changed lines are the same. - The native depth tests ran 10 times with no failure. Linux: 12 run, 11 pass, 1 skip (`agc_driver_native_depth_bda_clear`, which skips on lavapipe), 0 fail. On Windows all 12 skip, because the runner has no Vulkan device, so they ran on Linux only. The libc and libkernel suites run 166 and 264 tests on Linux and 194 and 286 on Windows, with 0 failed. They ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **f8af4b2173, a merge of #9533's 6eb141ce5f**, which merges `main` 102b7a5cf0 and with it Jamie's #12566 ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40953209732)). The one conflict was the include block of `MultisampleTarget.hpp`: `main`'s `<utility>` joins this PR's `<atomic>`, and both sides add `<vector>`. `MultisampleTarget.cpp` merged cleanly, with #12566's `HostOnlySampleRanges` next to this PR's `MultisampleColorTargetOver` and `MultisampleColorTargetsOver`. This PR's own diff is unchanged, apart from `#include <vector>`, which `main` now has too. The native depth and multisample tests (`^agc_driver_native_`) and `agc_frame_capture` ran 10 times with no failure. Linux: 15 run, 13 pass, 2 skip, 0 fail. Windows: 15 run, 1 pass, 14 skip, 0 fail; the 14 skip because the runner has no Vulkan device. The libc and libkernel suites run 193 and 294 tests on Linux and 223 and 317 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Validation comparison at f8af4b2173** (CONTRIBUTING's AGC rule). 426f5d4ffd changes only the debt file. The comparison on current `main`, at 1c904e29a2, is the last bullet. - **Arms:** `main` 102b7a5cf0, that head's base, against f8af4b2173. Since then `main` has changed only `libSceAgcDriver/CMakeLists.txt` and the debt file among this PR's paths. - **Setup:** GitHub's Linux runner (llvmpipe (LLVM 20.1.2), Mesa 25.2.8, Ubuntu 24.04.5), with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1` and `ctest -V`. - **The native tests** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40966388882)): every test matching `^agc_driver_native_`, 14 run, 12 pass, 2 skip (as in this PR's earlier runs on that runner), 0 fail. `main`'s arm ran the ones it has, and they pass. - **The layer:** the loader inserted `VK_LAYER_KHRONOS_validation` 15 times on `main` and 27 with the change, and neither log has `was not found`. Both logs report only `VUID-VkDeviceCreateInfo-pNext-pNext`, and the change adds none. - **`agc_driver_sample_multisample_target`:** it passes on both arms, with no new VUIDs ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40969982116)). ×10 on f8af4b2173 ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40969758169)): Linux 10 of 10; Windows skips, since the runner has no Vulkan device. - **Windows:** the tests build and skip, since the runner has no Vulkan device. The libc and libkernel suites run 193 and 294 tests on Linux and 223 and 317 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **426f5d4ffd, the debt entries** (docs only; the code's patch-id is unchanged): - This PR's colour-alias text moves out of #9533's "Native multisampled depth sampling" entry, which is #9533's text again, into two entries of its own. - Those are 786 and 420 characters, and the first states the unmeasured console behaviour first. - `check_conventions.py` has no errors, and its one remaining `debt-length` warning is #9533's entry, unchanged from 6eb141ce5f. - CI's conventions job passes on 426f5d4ffd ([run](https://github.com/boykopovar/AnyPS5/actions/runs/40978991384)). - **1c904e29a2, a merge of `main` 42d992b02a** (clean; this PR's own diff is unchanged). That `main` brings milescoviello's #10854 (a079dec978), which adds `OverwrittenOnGpu()` to the `DepthSurfaceTexture` condition in `DepthSurface.cpp`. - **×10** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41010650044)): every `^agc_driver_native_` test, plus `agc_driver_sample_multisample_target` and `agc_frame_capture`. Linux: 16 run, 14 pass, 2 skip (`agc_driver_native_depth_bda_clear` and `agc_driver_native_fmask`), 0 fail. Windows: 16 run, 1 pass, 15 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 198 and 304 tests on Linux and 225 and 326 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Validation comparison** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41010710846)): `main` 42d992b02a against 1c904e29a2, the same tests, on GitHub's Linux runner (llvmpipe (LLVM 20.1.2), Mesa 25.2.8) with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1` and `ctest -V`. The loader inserted the layer 16 times on `main` and 28 with the change, and neither log has `was not found`. Both logs report only `VUID-VkDeviceCreateInfo-pNext-pNext`, and the change adds none. - **Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, at this head** ([comment](https://github.com/boykopovar/AnyPS5/issues/5166#issuecomment-6526573860)): `main` 98ddd9c179 + #12840 425cd9d8b0 + #9742 1c904e29a2 (#9533's 6eb141ce5f inside), merged cleanly; Linux, RTX 4070 Ti (NVIDIA 615.71.09), release libraries, 21 GiB cap, booting from a settings save. No depth-plane alias refusal, and no `native multisample stencil or depth format import` stop. The run stops 33 s in, at the next check in compute shader 0x20001ef700, `native multisample depth sampled identity or format mismatch`, which #9717 takes. With #9717 added ([comment](https://github.com/boykopovar/AnyPS5/issues/5166#issuecomment-6527249459)), the next stop is `vkAllocateMemory sampled depth shadow: Vulkan result -2`, out of device memory with device-local heap 0 at 10,625 of 10,654 MiB, on a base before #13064. - **658b3e7df8, a merge of #9533's dcf420ec7f**, which brings #9533's merge of `main` 2b1ae87c69 and savvaniss's #8223 ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41139445310)). Clean; this PR's own diff changes only in #9533's `guardedColorBytes` position. - **×10:** the multisample target, frame capture, `^agc_driver_native_`, `^agc_driver_msaa_` and `^agc_driver_depth_` tests. - Linux: 57 run, 49 pass, 8 skip, 0 fail. - Windows: 57 run, 4 pass, 53 skip (no Vulkan device), 0 fail. - The libc and libkernel suites run 199 and 307 tests on Linux and 226 and 329 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **On a cloud Linux machine (lavapipe):** `ctest -R '^(agc|shader)'` 1,162 passed, 0 failed. - **1694dc0fd9, a merge of #9533's 071ca5b609**, which merges `main` 6a691f69ee and with it Celegans12's #8105 ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41184236792), validation [run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41184243184)). #9533's resolution, with its two test-file adaptations, is kept as is. - **The one conflict:** `CMakeLists.txt`, where `agc_driver_native_depth_buffer_clear` joins this PR's `set_tests_properties` lists, which also carry `agc_driver_native_depth_aliased_depth`. Those two lines are the only change to this PR's own lines over #9533. - **×10:** `agc_driver_native_multisample_depth`, `agc_driver_sample_multisample_target` and every `^agc_driver_native_depth` or `^agc_driver_depth_plane` test, `agc_driver_native_depth_aliased_depth` and `agc_driver_native_depth_buffer_clear` included. - Linux: 25 run, 24 pass, 1 skip, 0 fail. - Windows: 25 run, 0 pass, 25 skip (no Vulkan device), 0 fail. - The libc and libkernel suites run 199 and 308 tests on Linux and 226 and 330 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Validation** (`VERIFY_VALIDATION=1` on GitHub's Linux runner), `main` 6a691f69ee against this head, the same tests: `main`'s arm ran the ones it has, and both pass. The loader inserted `VK_LAYER_KHRONOS_validation` 28 times on `main` and 40 with this head, and neither log has `was not found`. Both report the same three IDs, `VUID-VkDeviceCreateInfo-pNext-pNext`, `VUID-vkCmdCopyImage-srcImage-01548` and `VUID-vkCmdCopyImage-srcImage-01551`, so the merge adds none. - **On a cloud Linux machine (lavapipe):** this PR's 12 tests from `agc_driver_native_multisample_depth_tests` pass 120 of 120 runs; `ctest -R '^(agc|shader)'` 1,091 passed, 75 skipped, 0 failed. - **d359d92d02, a merge of #9533's merge of `main` 0836dfdf4f** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41239634069), on f3ee9e9725, which has the same tree). #12862 moved `libSceAgcDriver`'s test registrations into `tests/cmake/`; the conflict in `CMakeLists.txt` is resolved with `tools/agc_test_split.py resolve`, which moves this PR's registration into `tests/cmake/agc_driver_native_multisample_depth_tests.cmake` (+3 −2 against #9533's merge). Nothing else conflicted. Apart from the move, this PR's diff is unchanged. With `-DBUILD_TESTING=ON`, `ctest -N` gives 3082 tests: `main`'s 3075 plus this PR's and #9533's 7 tests, each listed once. The 25 tests of this PR's verify set pass 10 runs in a row. Linux: 25 run, 24 pass, 1 skip, 0 fail. Windows: 25 run, 0 pass, 25 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (199 and 308) and on Windows (226 and 330). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **b3a54b169f, a merge of `main` 88e804b0a7** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41411982883)), which has #9533 and #9717. The three conflicts were both PRs' additions at the same places, and the merge keeps both: #9717's `CheckStencilView` with its `--stencil-view` case and this PR's `CheckAliasedDepth` with its case in `NativeMultisampleDepth.cpp`, both tests in the `tests/cmake/agc_driver_native_multisample_depth_tests.cmake` lists, and this PR's two debt entries after #9717's reworded sampling entry. This PR's changed lines are the same, except that those two cmake lists now also name #9717's `agc_driver_native_depth_stencil_view`. The 26 tests of this PR's verify set pass 10 runs in a row. Linux: 26 run, 25 pass, 1 skip, 0 fail. Windows: 26 run, 0 pass, 26 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (210 and 310) and on Windows (237 and 331). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. TechLevelZero's NVIDIA bot ran this head merged onto `main` 88e804b on an RTX 2000 Ada ([report](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6576823887)): 2,550 passed, 5 failed, none new (3 also fail on `main`, 2 unstable on `main`), 45 skipped, with no new validation IDs (971 tests on the GPU). Its AMD bot ran it merged onto `main` 7feb37e on a Radeon RX 6300 (RADV NAVI24, Mesa 25.2.8; [report](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6599261359)): 2,710 passed, 9 failed, none new (8 also fail on `main`, 1 unstable on `main`), 58 skipped, with no new validation IDs (928 tests on the GPU). - **Ghost of Tsushima Director's Cut (PPSA02225), by @xXPBSXx, at this head on current `main`** ([comment](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6598289239)): Windows, NVIDIA GeForce RTX 4080 SUPER (16 GB, driver 32.0.16.1074), one 600 s run per arm, with all libraries rebuilt for each. On `main` f6232fcfda, the run ends 24 s after the process starts, on the alias refusal (`native multisample depth or HTILE aliases a multisampled colour target whose samples are only on the host`). With b3a54b169f merged onto the same `main`, that refusal doesn't occur, and the run ends 9 min 21 s in, on the next stop: `sample-preserving guest publication of native multisample depth is not implemented` (compute shader `0x20001f3500`). A run of each arm under a locally built validation layer stopped inside the layer at start-up, so it gives no validation result. - **69d9d231c6, a merge of `main` 4f41f4c375** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41612056347)). - **The conflicts:** `tests/cmake/agc_driver_native_multisample_depth_tests.cmake`, where `main` adds `agc_driver_native_depth_uniform_planes` to the two `set_tests_properties` lists that carry this PR's `agc_driver_native_depth_aliased_depth`; the resolution is the union of the names, each once. And `docs/dev/debt/libSceAgcDriver.md`, where this PR's two entries and `main`'s new entries are adjacent, and both stay. - This PR's own lines are unchanged apart from those two list lines, which now carry `main`'s name too. - **×10:** every test matching `^agc_driver_native_depth`, `^agc_driver_native_multisample` or `^agc_driver_sample_multisample`. Linux: 16 run, 15 pass, 1 skip (`agc_driver_native_depth_bda_clear`, expected on lavapipe), 0 fail. Windows: 16 run, 0 pass, 16 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 300 and 322 tests on Linux and 327 and 342 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **GPUs:** TechLevelZero's bots ran this head merged onto `main` 4f41f4c. NVIDIA RTX 2000 Ada (driver 595.99.02; [report](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6604963146)): 2,746 passed, 6 failed, none new (3 also fail on `main`, 3 unstable on `main`), 48 skipped, with no new validation IDs (924 tests on the GPU). AMD Radeon RX 6300 (RADV NAVI24, Mesa 25.2.8; [report](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6604859389)): 2,739 passed, 5 failed, none new (all 5 also fail on `main`), 56 skipped, with no new validation IDs (979 tests on the GPU). - **9b5252fa33 and 5ca95d6cb0, for XairRrR's two open points** ([review](https://github.com/boykopovar/AnyPS5/pull/9742#pullrequestreview-5752538216)). - **9b5252fa33** (`DepthSurface.cpp`): `sameDepthAlias` compared the colour alias's fill count only through the refill rule, which needs a recorded clear. A colour target recorded with unknown contents (a fill over half its range before the import) that took another such fill after it kept its newest content, value and contents, so the next sample reused the import, where the debt entry says it refuses. The fill count must now match unless the refill rule accepts the fills. The aliased-depth test gains that case, `UnknownThenPartialFill`, which expects the refusal. - **5ca95d6cb0** (test-only): `agc_driver_native_depth_aliased_depth` ran every HTILE layout at 2, 4 and 8 samples in one ctest entry, about 640 cases on hardware with all three. XairRrR's review notes that it timed out under TechLevelZero's NVIDIA bot's parallel validation run at heads 426f5d4 through b3a54b1, and passed there only on retry. It now runs as three entries, one per HTILE layout: `agc_driver_native_depth_aliased_depth_depth_only`, `agc_driver_native_depth_aliased_depth_stencil` and `agc_driver_native_depth_aliased_depth_no_stencil`. - **Red:** c6de43b107, the split test without the new fill-count condition. On GitHub's Linux runner all three entries pass case 26 and fail at the new case 27 with "multisample target refusal did not match" ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41615481824)). - **×10** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41639606257)): every test matching `^agc_driver_native_depth`, `^agc_driver_native_multisample` or `^agc_driver_sample_multisample`. Linux: 18 run, 17 pass, 1 skip (`agc_driver_native_depth_bda_clear`, expected on lavapipe), 0 fail; each of the three new entries takes under 0.5 s on lavapipe. Windows: 18 run, 0 pass, 18 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 300 and 322 tests on Linux and 327 and 342 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **a8c64b9c3b, a merge of `main` 04a9eb4fa2,** which brings JAB-dev's #13021 ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41722139865)). - **The conflicts,** all with #13021: - `MultisampleTarget.hpp`: this PR's `MultisampleColorTargetsOver` declaration and #13021's `WithMultisampleTargetsLockForTest` both stay. - `MultisampleTarget.cpp`: #13021 takes the targets lock through `TargetsLock`, which marks it held for `HoldsMultisampleTargetsLock`, so native depth publication refuses while it's held. This PR's `MultisampleColorTargetsOver` now takes the lock the same way, in place of a plain `std::lock_guard`. - `docs/dev/debt/libSceAgcDriver.md`: #13021's guest publication entry and its edit of the depth sampling entry, which drops guest publication from what remains unimplemented, stay, followed by this PR's two colour-target entries. - Apart from that lock line, this PR's diff over `main` is unchanged. - **×10:** every test matching `^agc_driver_native_depth`, `^agc_driver_native_multisample` or `^agc_driver_sample_multisample`, which now takes in #13021's `agc_driver_native_depth_publication`. Linux: 19 run, 18 pass, 1 skip (`agc_driver_native_depth_bda_clear`, expected on lavapipe), 0 fail. Windows: 19 run, 0 pass, 19 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 300 and 324 tests on Linux and 330 and 342 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. ### 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: #15443 (merge order only); #13021, #9533 and #9717 have merged (#6044 was closed, and #8115 and #8121 merged; see Overlap); #10882 (orezraey) goes after this PR (merge order only, on #10882) - [x] Fixes: none (related: #5166) - [x] Unblocks: Ghost of Tsushima Director's Cut (PPSA02225) #4461: this PR clears the depth-plane alias stop on #9533. With #9717, #8115 and #8121 as well, the title reaches its brightness calibration screen and intro, with no refusal or crash through the 600 s limit, warm and cold (milescoviello's run, [comment](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6346148575)). Later runs on that host ended at the memory cap, the latest at 493 s on current `main`, after a 3D scene (see Tested). - [x] GPUs tested: NVIDIA GeForce RTX 3070 Laptop GPU (617.42, Windows 11); Mesa llvmpipe (LLVM 20.1.2), Ubuntu 24.04, on GitHub's Linux runner and a cloud Linux machine; NVIDIA GeForce RTX 4070 Ti (615.71.09), Linux, in milescoviello's title runs; AMD Radeon RX 6400, Windows, in xXPBSXx's title runs; NVIDIA GeForce RTX 4080 SUPER, Windows, in xXPBSXx's title run - [x] AI-assisted: yes
MarcZX10 commented 2026-10-22 11:53:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T11:53:08Z.


Two checklist/process items to close before this stack is ready for merge:

  • The branch is 123 commits behind current main. Please refresh the stack (and rerun the focused validation/test comparison against its updated dependency base); the current runner policy skips full Linux and Windows jobs for PRs.
  • The Unblocks entry names PPSA02225 but omits its Game bring-up discussion. The repository checklist requires the title ID and discussion link; the matching thread is Ghost of Tsushima Director’s Cut (PPSA02225), discussion #4461. Since the post-change title run is still pending, please keep the entry from implying that the title is already confirmed past this stop.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6340076589 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6340076589). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T11:53:08Z. --- Two checklist/process items to close before this stack is ready for merge: - The branch is 123 commits behind current `main`. Please refresh the stack (and rerun the focused validation/test comparison against its updated dependency base); the current runner policy skips full Linux and Windows jobs for PRs. - The `Unblocks` entry names PPSA02225 but omits its Game bring-up discussion. The repository checklist requires the title ID and discussion link; the matching thread is [Ghost of Tsushima Director’s Cut (PPSA02225), discussion #4461](https://github.com/boykopovar/AnyPS5/discussions/4461). Since the post-change title run is still pending, please keep the entry from implying that the title is already confirmed past this stop.
milescoviello commented 2026-10-22 14:26:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-22T14:26:16Z.


@EagleBearerYS Ghost of Tsushima (PPSA02225) on this PR's head 219e925509, the same way as on #9533: release libs at that commit, Linux, RTX 4070 Ti, NVIDIA 615.71.09, 16 GB cap, warm and cold.

  • Warm: the depth-plane alias no longer stops it. The import still prints the alias line, then accepts it. The run stops at 14 s, in the same compute shader, on the identity check in CheckResource:
    [gpu] native multisample depth 0x1544ed0000+0x1fe0000 aliases multisampled colour target 0x1544ed0000+0x1fe0000 (vk format 100, 2 samples), newest clear 0x00000000 0x00000000 0x00000000 0x00000000
    compute shader 0x20001ef700: AGC graphics: native multisample depth sampled identity or format mismatch
    
    The sampled T# differs from the depth target in address, size, samples or format. If it's the D32S8 target's stencil plane, that's #9717's case, which matches what @dantdmdarealguy saw on Windows (#5166).
  • Cold: a SIGSEGV at 16 s with no message before it. The log's last lines are trophy statistics rules and shader cache counters, and I didn't keep the core, so I can't say yet whether it's related. One run.

I can run #9717's head next if you'd like, warm and cold the same way.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6343190451 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6343190451). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-22T14:26:16Z. --- @EagleBearerYS Ghost of Tsushima (PPSA02225) on this PR's head `219e925509`, the same way as on #9533: release libs at that commit, Linux, RTX 4070 Ti, NVIDIA 615.71.09, 16 GB cap, warm and cold. - **Warm:** the depth-plane alias no longer stops it. The import still prints the alias line, then accepts it. The run stops at 14 s, in the same compute shader, on the identity check in `CheckResource`: ``` [gpu] native multisample depth 0x1544ed0000+0x1fe0000 aliases multisampled colour target 0x1544ed0000+0x1fe0000 (vk format 100, 2 samples), newest clear 0x00000000 0x00000000 0x00000000 0x00000000 compute shader 0x20001ef700: AGC graphics: native multisample depth sampled identity or format mismatch ``` The sampled T# differs from the depth target in address, size, samples or format. If it's the D32S8 target's stencil plane, that's #9717's case, which matches what @dantdmdarealguy saw on Windows (#5166). - **Cold:** a SIGSEGV at 16 s with no message before it. The log's last lines are trophy statistics rules and shader cache counters, and I didn't keep the core, so I can't say yet whether it's related. One run. I can run #9717's head next if you'd like, warm and cold the same way. AI-assisted: yes (Claude Code)
EagleBearerYS commented 2026-10-22 14:33:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T14:33:38Z.


@milescoviello thanks for the warm and cold runs. The alias line followed by an accepted import is what this PR should do, and the next stop, native multisample depth sampled identity or format mismatch, looks like the per-sample stencil-plane read that #9717 covers, since @dantdmdarealguy's Windows run with #9717 got past it. #9717 on its own stops at the alias first, so a branch with both is being put together for title runs; I'll link it here when it's up, and a warm and cold run on it would show what comes after. If the cold SIGSEGV shows up again, a backtrace or the core would help tell whether it's related. Your run is in Tested.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6343342912 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6343342912). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T14:33:38Z. --- @milescoviello thanks for the warm and cold runs. The alias line followed by an accepted import is what this PR should do, and the next stop, `native multisample depth sampled identity or format mismatch`, looks like the per-sample stencil-plane read that #9717 covers, since @dantdmdarealguy's Windows run with #9717 got past it. #9717 on its own stops at the alias first, so a branch with both is being put together for title runs; I'll link it here when it's up, and a warm and cold run on it would show what comes after. If the cold SIGSEGV shows up again, a backtrace or the core would help tell whether it's related. Your run is in Tested.
EagleBearerYS commented 2026-10-22 14:59:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T14:59:26Z.


@milescoviello @dantdmdarealguy the branch with both PRs is up: test/ghost-9742-9717 at 3ec696f7fe. It merges this PR's 219e925509 and #9717's 767374011f, which are both on #9533's 514643ab16. Only the test file, the test registrations and the debt entry needed resolving, and both sides are kept there; no driver file conflicted. The native depth tests pass on Linux with lavapipe (one skips there, as it does on #9533). This is a test branch for title runs, not a PR. A warm and a cold run of Ghost of Tsushima Director's Cut (PPSA02225) on it would show what comes after the stencil-plane read.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6343901038 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6343901038). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T14:59:26Z. --- @milescoviello @dantdmdarealguy the branch with both PRs is up: [`test/ghost-9742-9717`](https://github.com/EagleBearerYS/AnyPS5/tree/test/ghost-9742-9717) at [3ec696f7fe](https://github.com/EagleBearerYS/AnyPS5/commit/3ec696f7fe). It merges this PR's 219e925509 and #9717's 767374011f, which are both on #9533's 514643ab16. Only the test file, the test registrations and the debt entry needed resolving, and both sides are kept there; no driver file conflicted. The native depth tests pass on Linux with lavapipe (one skips there, as it does on #9533). This is a test branch for title runs, not a PR. A warm and a cold run of Ghost of Tsushima Director's Cut (PPSA02225) on it would show what comes after the stencil-plane read.
MarcZX10 commented 2026-10-22 15:01:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T15:01:52Z.

Review: CHANGES_REQUESTED


I reviewed the follow-up commit 219e925509. Its acceptance remains limited to a single matching-sample color alias on a depth-only-HTILE path, with the clear proof still required and subsequent alias-content changes rejected. I did not find a concrete defect in this commit.

The latest Ghost run is useful and narrows the result: the depth-plane alias import now succeeds, but the run stops at native multisample depth sampled identity or format mismatch, consistent with the separate stencil-plane path in #9717. The cold SIGSEGV has no backtrace and cannot yet be attributed to this change. Please keep the title status precise: this confirms the import stop is passed, but does not yet confirm overall title progression.

Before merge, this stack needs to be refreshed and conflicts resolved. GitHub currently reports this PR as CONFLICTING; its head is 173 commits behind current main (15 commits ahead). Its dependency #9533 is also currently conflicting with main. Please update the stack in dependency order and rerun the focused native-depth tests and the required same-machine validation comparison on the refreshed base and change. The PR already records useful llvmpipe and validation-layer runs for its earlier tested base, but current main has moved since those runs. Hosted product build jobs are skipped; conventions, intake, labels and report checks pass.

One checklist item from my earlier comment remains: Unblocks needs the title’s Game bring-up discussion link, #4461, per CONTRIBUTING.md. Since the new run confirms this specific import stop is gone, please replace the stale “once a run confirms it” wording with the supported result, and retain the later stencil stop as the current title limitation.

Local checks: the current conventions check reports one debt-length warning on the inherited long native multisample depth entry and no errors; GitHub conventions pass. I could not run native-depth tests locally because this checkout has no configured build and about 649 MB free.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5616304870 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9742#pullrequestreview-5616304870). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T15:01:52Z. **Review:** CHANGES_REQUESTED --- I reviewed the follow-up commit `219e925509`. Its acceptance remains limited to a single matching-sample color alias on a depth-only-HTILE path, with the clear proof still required and subsequent alias-content changes rejected. I did not find a concrete defect in this commit. The latest Ghost run is useful and narrows the result: the depth-plane alias import now succeeds, but the run stops at `native multisample depth sampled identity or format mismatch`, consistent with the separate stencil-plane path in #9717. The cold SIGSEGV has no backtrace and cannot yet be attributed to this change. Please keep the title status precise: this confirms the import stop is passed, but does not yet confirm overall title progression. Before merge, this stack needs to be refreshed and conflicts resolved. GitHub currently reports this PR as `CONFLICTING`; its head is 173 commits behind current `main` (15 commits ahead). Its dependency #9533 is also currently conflicting with `main`. Please update the stack in dependency order and rerun the focused native-depth tests and the required same-machine validation comparison on the refreshed base and change. The PR already records useful llvmpipe and validation-layer runs for its earlier tested base, but current main has moved since those runs. Hosted product build jobs are skipped; conventions, intake, labels and report checks pass. One checklist item from my earlier comment remains: `Unblocks` needs the title’s Game bring-up discussion link, #4461, per `CONTRIBUTING.md`. Since the new run confirms this specific import stop is gone, please replace the stale “once a run confirms it” wording with the supported result, and retain the later stencil stop as the current title limitation. Local checks: the current conventions check reports one `debt-length` warning on the inherited long native multisample depth entry and no errors; GitHub conventions pass. I could not run native-depth tests locally because this checkout has no configured build and about 649 MB free.
milescoviello commented 2026-10-22 15:19:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-22T15:19:49Z.


@EagleBearerYS Ghost of Tsushima (PPSA02225) on test/ghost-9742-9717 at 3ec696f7fe, the same way as before. Release libs at that commit, Linux, RTX 4070 Ti, NVIDIA 615.71.09; warm at 16 GB, cold at 20 GB.

Both runs now get much further: warm to 246 s, cold to 254 s, with no native multisample depth or stencil refusal. The alias line is still printed once and then accepted, as before. Both stop on the same check:

AGC graphics: a color target's sample count differs from the rasterizer's

That's the case my #8115 handles: it draws one-sample colour targets beside a multisampled rasterizer. @dantdmdarealguy's Windows stack, which reached the mask screen, also had #8115. If it helps, I can run this branch with #8115 merged next, warm and cold, to see what comes after.

The cold SIGSEGV from the 219e925509 run didn't come back here. That crash was in ShaderRecompiler::MaskedSelectEliminator::Eliminate, libSceAgcDriver.prx+0x77ac17, from the kernel log: a null next node while walking a block's instructions in removeFullWaveSelects. It's in the shader recompiler, not in this PR's code. I'm looking for the shader behind it separately.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6344352615 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6344352615). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-22T15:19:49Z. --- @EagleBearerYS Ghost of Tsushima (PPSA02225) on `test/ghost-9742-9717` at `3ec696f7fe`, the same way as before. Release libs at that commit, Linux, RTX 4070 Ti, NVIDIA 615.71.09; warm at 16 GB, cold at 20 GB. Both runs now get much further: warm to 246 s, cold to 254 s, with no native multisample depth or stencil refusal. The alias line is still printed once and then accepted, as before. Both stop on the same check: ``` AGC graphics: a color target's sample count differs from the rasterizer's ``` That's the case my #8115 handles: it draws one-sample colour targets beside a multisampled rasterizer. @dantdmdarealguy's Windows stack, which reached the mask screen, also had #8115. If it helps, I can run this branch with #8115 merged next, warm and cold, to see what comes after. The cold SIGSEGV from the `219e925509` run didn't come back here. That crash was in `ShaderRecompiler::MaskedSelectEliminator::Eliminate`, `libSceAgcDriver.prx+0x77ac17`, from the kernel log: a null next node while walking a block's instructions in `removeFullWaveSelects`. It's in the shader recompiler, not in this PR's code. I'm looking for the shader behind it separately. AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-10-22 17:05:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T17:05:52Z.

Review: COMMENTED


The later combined-stack Ghost run (with #9717, #8115 and #8121) reports the alias accepted and progress to the intro within 600 seconds, with no refusal/crash during that run. Please update the checklist’s Unblocks line to link Game bring-up discussion #4461 and accurately state that this PR clears the depth-plane alias stop; the current line still describes the earlier 246/254-second stop and says #8115 handles the next sample-count refusal. The PR correctly lists Depends on: #9533; please coordinate its order with #9717/#8115/#8121 as already discussed. This head is based on b7d1d47a5f, 21 commits behind current main (11f976b27c16ed91633f00039dba5dfd97dd7cc1); current merge-tree and diff-check are clean. Please refresh the stack and rerun focused native-depth tests on current main and the final head; the earlier GitHub runner suite/validation-layer evidence used the prior base. I did not run GPU tests locally.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5617964781 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9742#pullrequestreview-5617964781). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T17:05:52Z. **Review:** COMMENTED --- The later combined-stack Ghost run (with #9717, #8115 and #8121) reports the alias accepted and progress to the intro within 600 seconds, with no refusal/crash during that run. Please update the checklist’s `Unblocks` line to link Game bring-up discussion #4461 and accurately state that this PR clears the depth-plane alias stop; the current line still describes the earlier 246/254-second stop and says #8115 handles the next sample-count refusal. The PR correctly lists `Depends on: #9533`; please coordinate its order with #9717/#8115/#8121 as already discussed. This head is based on `b7d1d47a5f`, 21 commits behind current main (`11f976b27c16ed91633f00039dba5dfd97dd7cc1`); current merge-tree and diff-check are clean. Please refresh the stack and rerun focused native-depth tests on current main and the final head; the earlier GitHub runner suite/validation-layer evidence used the prior base. I did not run GPU tests locally.
jotitadev commented 2026-10-23 04:52:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-23T04:52:41Z.

Review: COMMENTED


First run on Apple silicon.

Setup: Apple M2 Max (32 GB), macOS 27.2, x86_64 build under Rosetta, Release, BUILD_TESTING=ON. Method: #8658 (feat/macos-port) @ dc0c8db500 plus #9533 @ 1582cf6cc0 plus this PR's own diff over #9533 (head 07007fdc45), not main, since main does not build on macOS yet. Two drivers: Vulkan SDK 1.4.363.0 MoltenVK 1.4.2, and MoltenVK main with SPIRV-Cross #2704. ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, ctest -j1 --timeout 30 -V.

SDK MoltenVK 1.4.2 MoltenVK main + #2704
#9533 + this PR's test files only (red) agc_driver_native_depth_aliased_depth fails with native multisample depth or HTILE aliases a multisampled colour target whose samples are only on the host same
#9533 + this PR (green) agc_driver_native_depth_aliased_depth passes: cases checked=40 unavailable=26, at 2 and 4 samples same
  • Focused set ctest -R 'native_depth|native_multisample_depth|depth_alias|msaa' (21 entries) with this PR: 19/21 on both drivers, with agc_driver_msaa_dcc_clear_8 skipped.
  • The 2 failures are agc_driver_native_depth_driver_path and agc_driver_native_depth_driver_queued_fill from #9533. Their cases pass, but the process aborts at exit on macOS (recursive_mutex lock failed: Invalid argument from ~VulkanDevice), as reported in my #9533 review. They are not from this PR.

GPUs tested: Apple M2 Max (MoltenVK 1.4.2 from Vulkan SDK 1.4.363.0, and MoltenVK main + SPIRV-Cross #2704), macOS 27.2.

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

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5624038784 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9742#pullrequestreview-5624038784). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-23T04:52:41Z. **Review:** COMMENTED --- First run on Apple silicon. **Setup:** Apple M2 Max (32 GB), macOS 27.2, x86_64 build under Rosetta, Release, `BUILD_TESTING=ON`. Method: #8658 (`feat/macos-port`) @ `dc0c8db500` plus #9533 @ `1582cf6cc0` plus this PR's own diff over #9533 (head `07007fdc45`), not `main`, since `main` does not build on macOS yet. Two drivers: Vulkan SDK 1.4.363.0 MoltenVK 1.4.2, and MoltenVK `main` with SPIRV-Cross #2704. `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`, `ctest -j1 --timeout 30 -V`. | | SDK MoltenVK 1.4.2 | MoltenVK main + #2704 | |---|---|---| | #9533 + this PR's test files only (red) | `agc_driver_native_depth_aliased_depth` fails with `native multisample depth or HTILE aliases a multisampled colour target whose samples are only on the host` | same | | #9533 + this PR (green) | `agc_driver_native_depth_aliased_depth` passes: `cases checked=40 unavailable=26`, at 2 and 4 samples | same | - Focused set `ctest -R 'native_depth|native_multisample_depth|depth_alias|msaa'` (21 entries) with this PR: 19/21 on both drivers, with `agc_driver_msaa_dcc_clear_8` skipped. - The 2 failures are `agc_driver_native_depth_driver_path` and `agc_driver_native_depth_driver_queued_fill` from #9533. Their cases pass, but the process aborts at exit on macOS (`recursive_mutex lock failed: Invalid argument` from `~VulkanDevice`), as reported in my #9533 review. They are not from this PR. GPUs tested: Apple M2 Max (MoltenVK 1.4.2 from Vulkan SDK 1.4.363.0, and MoltenVK main + SPIRV-Cross #2704), macOS 27.2. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
MarcZX10 commented 2026-10-29 08:21:08 +00:00 (Migrated from github.com)

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

Review: CHANGES_REQUESTED


Rechecked current head 97c707a4f15131e65040e868bb55c9cd04fef3c7 against live main 4c7d275bef89d309313d16bc2bc05d37a1b50be2 and the latest Ghost of Tsushima report.

The description now correctly links the Game bring-up item #4461 and says this change clears the depth-plane alias stop. The new 360-second report is useful system evidence, but its test branch also includes #9717, nine other PRs, and a local markLayersPending fix, so it does not isolate this PR or establish current-main equivalence.

Changes requested

  1. Current-main integration and focused rerun. The current merge preview is clean (bebae5458621aa8943cb4ee14e513acffaa8d448), but since the PR base ccfb96757f9e31a8f4330cf25f193aae607d7409, main has changed eight paths shared with this PR: AGC CMake, DrawPrecheck.cpp, State.hpp/.cpp, DepthSurface.cpp, Draw.cpp, NativeMultisampleDepth.cpp, and the debt file. Please sync the PR/declared stack to current main and report focused native-depth tests on exact current-main and final-head revisions.
  2. Coordinate #9717. Pairwise git merge-tree between this head and #9717 conflicts in AGC CMake, tests/execution/NativeMultisampleDepth.cpp, and the debt file. #9717 is used in the new title run, but neither checklist declares the agreed order. Please agree the landing order with its author and record the dependency on both PRs.
  3. Debt entry length. Current conventions reports the PR's changed debt entry as 4,651 characters, above the 1,000-character limit. Please split it into concise entries by remaining behavior and retain the unmeasured-console gap first.

git diff --check passes. Conventions reports one debt-length finding (zero errors); the same check passes on current main. I did not run local GPU tests. I have not treated the stacked title run as a standalone validation of this PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5694693784 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9742#pullrequestreview-5694693784). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T08:21:08Z. **Review:** CHANGES_REQUESTED --- Rechecked current head `97c707a4f15131e65040e868bb55c9cd04fef3c7` against live `main` `4c7d275bef89d309313d16bc2bc05d37a1b50be2` and the latest Ghost of Tsushima report. The description now correctly links the Game bring-up item #4461 and says this change clears the depth-plane alias stop. The new 360-second report is useful system evidence, but its test branch also includes #9717, nine other PRs, and a local `markLayersPending` fix, so it does not isolate this PR or establish current-main equivalence. ### Changes requested 1. **Current-main integration and focused rerun.** The current merge preview is clean (`bebae5458621aa8943cb4ee14e513acffaa8d448`), but since the PR base `ccfb96757f9e31a8f4330cf25f193aae607d7409`, `main` has changed eight paths shared with this PR: AGC CMake, `DrawPrecheck.cpp`, `State.hpp/.cpp`, `DepthSurface.cpp`, `Draw.cpp`, `NativeMultisampleDepth.cpp`, and the debt file. Please sync the PR/declared stack to current main and report focused native-depth tests on exact current-main and final-head revisions. 2. **Coordinate #9717.** Pairwise `git merge-tree` between this head and #9717 conflicts in AGC CMake, `tests/execution/NativeMultisampleDepth.cpp`, and the debt file. #9717 is used in the new title run, but neither checklist declares the agreed order. Please agree the landing order with its author and record the dependency on both PRs. 3. **Debt entry length.** Current conventions reports the PR's changed debt entry as 4,651 characters, above the 1,000-character limit. Please split it into concise entries by remaining behavior and retain the unmeasured-console gap first. `git diff --check` passes. Conventions reports one debt-length finding (zero errors); the same check passes on current `main`. I did not run local GPU tests. I have not treated the stacked title run as a standalone validation of this PR.
MarcZX10 commented 2026-10-30 01:13:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T01:13:55Z.

Review: CHANGES_REQUESTED


Re-checked — new head, changes requested

I reviewed head 426f5d4ffdba8892a2ab0e7e2d979594ff5bf921; the dependency order and debt split are addressed, but the focused validation still predates a relevant DepthSurface.cpp change on current main.

What I ran

  • Refreshed PR #9742 and upstream main; reviewed the supplied update at comment 6512092815.
  • Previewed head 426f5d4ffdba8892a2ab0e7e2d979594ff5bf921 against current main 1a217758a55c09e817366fa4411daac854eeb3f9; merge base is 102b7a5cf0ed98dd94d9da76862eb1ee7865a932 and the merge tree is clean (f83863fd687c0acafd6813aba97d0c413f0837e2).
  • Ran git diff --check upstream/main...refs/review/upstream-9742 and python tools/check_conventions.py --base upstream/main --head refs/review/upstream-9742 on Linux with Python 3.11.2. I did not build or run GPU tests locally.
  • Compared current main with the reported test base for the PR paths. Current main has a DepthSurface.cpp change in addition to CMake and debt-file changes.

Results

Check Result
Current-main merge preview Pass; clean tree f83863fd687c0acafd6813aba97d0c413f0837e2
git diff --check Pass; no output
Conventions 0 errors; one debt-length warning on the inherited #9533 entry
Focused tests and validation comparison Author-reported pass on the earlier main base 102b7a5cf0; not run against current main
Unedited local check output
docs/dev/debt/libSceAgcDriver.md:39: warning: [debt-length] Technical debt entry over 1000 characters: state the gap first (what differs from the console, what is unverified, what throws) and keep only the behaviour it needs: 3990 characters
1 findings, 0 errors; GitHub shows at most 10 error annotations, the job summary lists all
102b7a5cf0ed98dd94d9da76862eb1ee7865a932
f83863fd687c0acafd6813aba97d0c413f0837e2
core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md

Findings

Blocking

  • Current main adds OverwrittenOnGpu() and uses it in the DepthSurfaceTexture rejection/retirement condition. This is in the same DepthSurface.cpp implementation changed by this PR and was not present in the reported focused/validation base 102b7a5cf0. The reported rerun at f8af4b2173 and validation comparison therefore do not cover the interaction with the current code. Please rerun the focused native-depth tests and the repository-required validation-layer comparison on current main 1a217758a55c09e817366fa4411daac854eeb3f9 and the exact PR stack, and report the exact tested revisions and any new VUID- messages.

Non-blocking

  • The update resolves the previous order question: #9742 is listed first and #9717 after it on both PRs. The debt entries are split, and the remaining convention warning is reported as belonging to the inherited #9533 entry.

Sources

Not verified

  • I did not build, run the focused CTests, run Vulkan validation, or reproduce the title behavior locally. The new test/validation results described above are author-reported and use an earlier base.

To get this to a good state

Run the focused native-depth suite and the same ctest -V validation comparison on current main and the exact PR stack, with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, and ANYPS5_REQUIRE_VULKAN=1. I will re-check the new revisions, repeat the non-build checks above, and compare the validation output.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5706974263 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9742#pullrequestreview-5706974263). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T01:13:55Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, changes requested I reviewed head `426f5d4ffdba8892a2ab0e7e2d979594ff5bf921`; the dependency order and debt split are addressed, but the focused validation still predates a relevant `DepthSurface.cpp` change on current `main`. ## What I ran - Refreshed PR #9742 and upstream `main`; reviewed the supplied update at [comment 6512092815](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6512092815). - Previewed head `426f5d4ffdba8892a2ab0e7e2d979594ff5bf921` against current `main` `1a217758a55c09e817366fa4411daac854eeb3f9`; merge base is `102b7a5cf0ed98dd94d9da76862eb1ee7865a932` and the merge tree is clean (`f83863fd687c0acafd6813aba97d0c413f0837e2`). - Ran `git diff --check upstream/main...refs/review/upstream-9742` and `python tools/check_conventions.py --base upstream/main --head refs/review/upstream-9742` on Linux with Python 3.11.2. I did not build or run GPU tests locally. - Compared current `main` with the reported test base for the PR paths. Current `main` has a `DepthSurface.cpp` change in addition to CMake and debt-file changes. ## Results | Check | Result | |---|---| | Current-main merge preview | Pass; clean tree `f83863fd687c0acafd6813aba97d0c413f0837e2` | | `git diff --check` | Pass; no output | | Conventions | 0 errors; one debt-length warning on the inherited #9533 entry | | Focused tests and validation comparison | Author-reported pass on the earlier `main` base `102b7a5cf0`; not run against current `main` | <details><summary>Unedited local check output</summary> ```text docs/dev/debt/libSceAgcDriver.md:39: warning: [debt-length] Technical debt entry over 1000 characters: state the gap first (what differs from the console, what is unverified, what throws) and keep only the behaviour it needs: 3990 characters 1 findings, 0 errors; GitHub shows at most 10 error annotations, the job summary lists all 102b7a5cf0ed98dd94d9da76862eb1ee7865a932 f83863fd687c0acafd6813aba97d0c413f0837e2 core/libs/prx/libSceAgcDriver/CMakeLists.txt core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp docs/dev/debt/libSceAgcDriver.md ``` </details> ## Findings ### Blocking - Current `main` adds `OverwrittenOnGpu()` and uses it in the `DepthSurfaceTexture` rejection/retirement condition. This is in the same `DepthSurface.cpp` implementation changed by this PR and was not present in the reported focused/validation base `102b7a5cf0`. The reported rerun at `f8af4b2173` and validation comparison therefore do not cover the interaction with the current code. Please rerun the focused native-depth tests and the repository-required validation-layer comparison on current `main` `1a217758a55c09e817366fa4411daac854eeb3f9` and the exact PR stack, and report the exact tested revisions and any new `VUID-` messages. ### Non-blocking - The update resolves the previous order question: #9742 is listed first and #9717 after it on both PRs. The debt entries are split, and the remaining convention warning is reported as belonging to the inherited #9533 entry. ## Sources - [Current-main pending-write guard in `DepthSurface.cpp`](https://github.com/boykopovar/AnyPS5/blob/1a217758a55c09e817366fa4411daac854eeb3f9/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp#L2666-L2669) - [Repository AGC validation requirement](https://github.com/boykopovar/AnyPS5/blob/1a217758a55c09e817366fa4411daac854eeb3f9/CONTRIBUTING.md#L72) - [Author's test and validation update](https://github.com/boykopovar/AnyPS5/pull/9742#issuecomment-6512092815) ## Not verified - I did not build, run the focused CTests, run Vulkan validation, or reproduce the title behavior locally. The new test/validation results described above are author-reported and use an earlier base. ## To get this to a good state Run the focused native-depth suite and the same `ctest -V` validation comparison on current `main` and the exact PR stack, with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, and `ANYPS5_REQUIRE_VULKAN=1`. I will re-check the new revisions, repeat the non-build checks above, and compare the validation output.
XairRrR commented 2026-11-03 08:14:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T08:14:31Z.

Review: APPROVED


Reviewed — approved

The merged tree builds and agc_driver_native_depth_aliased_depth passes with the validation layer loaded and adds no new VUID. With main's production files it fails with the depth-alias refusal, as it should. The only new failure in the run, agc_map_gate_disjoint, is a flake that also happens with main's code. I found two non-blocking points.

What I ran

Head b3a54b169f82c0b4a62673438132248a2c9abf3b, main d1ae628bc2f62459cce1e9872ba5632c938c71f2, merged tree 30450dbe174f927b6bd4f7eff0c04ddce849e00d. Debian 13 VM (2× Xeon Gold 6136), GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19).

git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...b3a54b169f82c0b4a62673438132248a2c9abf3b
python3 tools/check_conventions.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2
ctest --test-dir build -R '^agc_map_gate_disjoint$' --repeat until-fail:5 --output-on-failure
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 -R '^agc_driver_native_(depth|multisample)' --output-on-failure
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_aliased_depth$'
# negative control: MultisampleTarget.hpp, DepthSurface.cpp, MultisampleTarget.cpp from main
ninja -C build -j32 -l32 agc_driver_native_multisample_depth_tests agc_driver_recorder_tests
ctest --test-dir build -R '^agc_driver_native_depth_aliased_depth$' --output-on-failure
ctest --test-dir build -R '^agc_map_gate_disjoint$' --repeat until-fail:30 --output-on-failure   # several times
# restore merged files, rebuild the same targets, git status --porcelain

Results

Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Configure, build, libs (script) passed
Selected tests (script) 2192 ran, 2071 passed, 113 skips all expected. 7 known failures from main. 1 new failure: agc_map_gate_disjoint (see below)
agc_map_gate_disjoint Intermittent: failed on the 4th of 5 repeats with the merged tree. With main's production files in place it failed again (AGC graphics: (d) no watched block on other stripes) on one of three 30-repeat loops. It does not come from this PR
Native depth / multisample tests with the validation layer 13 of 14 pass. agc_driver_native_depth_bda_clear skips (expected on lavapipe)
agc_driver_native_depth_aliased_depth (verbose run with the validation layer) passes in 1.3 s, cases checked=412 unavailable=230. The layer loaded and there is no was not found line. No VUID- lines
Script's validation comparison 768 tests, layer loaded in 767, layer_missing_in empty, no new VUIDs
agc_map_gate_disjoint with main's production files
    Test #1921: agc_map_gate_disjoint ............***Failed    0.15 sec
AGC graphics: (d) no watched block on other stripes

Negative control

I restored MultisampleTarget.hpp, DepthSurface.cpp and MultisampleTarget.cpp from main and rebuilt. agc_driver_native_depth_aliased_depth then fails on the first acceptance case:

output
[gpu] native multisample depth 0x7fed4b6b0000+0x10000 aliases multisampled colour target 0x7fed4b6b0000+0x10000 (vk format 100, 4 samples), newest clear 0x3e800000 0x00000000 0x00000000 0x00000000
AGC graphics: native multisample depth or HTILE aliases a multisampled colour target whose samples are only on the host

I then restored the merged files and rebuilt. git status --porcelain is empty.

Findings

Blocking

None.

Non-blocking

  1. A partial fill after import is not refused when the recorded alias was Unknown. See core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:125-132 (head).
    • soleDepthAlias accepts the alias whatever its newest content, including Unknown. Alias() returns Unknown while the target has a colour-fill, CMASK or HTILE refusal (MultisampleTarget.cpp:650).
    • Suppose the target is recorded as Unknown and then notes another partial fill. newest stays Unknown, both values are empty and contents doesn't change, so sameDepthAlias returns true. It never compares fills unless the recorded content was Clear.
    • The new debt entry says sampling "refuses at the next sample once that target … takes any fill but one or more identical ones over its whole range". In this case it does not.
    • The depth read still comes from the HTILE-proved clear, and guest writes over the plane are still caught by the final UnchangedSinceAll check. So this is a gap between the code and the debt text, not a wrong depth value I could show.
    • Suggested fix: add (current.fills == recorded.fills || refilled) to the return condition, with a case for an Unknown alias followed by a partial fill.
  2. agc_driver_native_depth_aliased_depth is near the 30 s limit on another runner. TechLevelZero's NVIDIA bot reported it at the 30.1 s timeout in its parallel validation run on every head since 426f5d4. It passed only on retry, "also passed only on retry in 5 other runs in the last 7 days" at this head. On lavapipe here it takes 1.3 s (412 cases), so CI's 30 s rule is met. On hardware that runs 2, 4 and 8 samples the test has about 640 cases. CONTRIBUTING asks to split a test that gets close to the limit instead of relying on retries. Splitting --aliased-depth by sample count or HTILE layout into separate ctest entries would keep each well under 30 s.

Other checks:

  • contents is only changed under targetsMutex(): acquire, the view and order-target helpers, and MultisampleTargetStorageView. Alias() reads it under the same lock, so I see no data race.
  • The ordering of MultisampleColorTargetOver is preserved: it takes the front of the new list, which matches the old first-match result.
  • No code comments were added, and the debt file has two new entries.
  • The checklist has Depends on, Fixes, Unblocks (PPSA02225 #4461), GPUs tested and AI-assisted lines.

Not verified

  • I did not run the 2- and 8-sample cases: lavapipe supports only 1 and 4 samples, and 230 cases were unavailable.
  • I did not run any NVIDIA or AMD GPU, and launched no titles. The Ghost of Tsushima and Dave the Diver results are the author's and commenters' runs.
  • I did not compare the console behaviour of the HTILE fast-clear rule. The debt entry already records it as unmeasured.
  • I did not investigate why agc_map_gate_disjoint flakes, only that it also fails with main's code.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5748945659 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9742#pullrequestreview-5748945659). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T08:14:31Z. **Review:** APPROVED --- # Reviewed — approved The merged tree builds and `agc_driver_native_depth_aliased_depth` passes with the validation layer loaded and adds no new VUID. With `main`'s production files it fails with the depth-alias refusal, as it should. The only new failure in the run, `agc_map_gate_disjoint`, is a flake that also happens with `main`'s code. I found two non-blocking points. ## What I ran Head `b3a54b169f82c0b4a62673438132248a2c9abf3b`, `main` `d1ae628bc2f62459cce1e9872ba5632c938c71f2`, merged tree `30450dbe174f927b6bd4f7eff0c04ddce849e00d`. Debian 13 VM (2× Xeon Gold 6136), GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19). ``` git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...b3a54b169f82c0b4a62673438132248a2c9abf3b python3 tools/check_conventions.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2 ctest --test-dir build -R '^agc_map_gate_disjoint$' --repeat until-fail:5 --output-on-failure env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 -R '^agc_driver_native_(depth|multisample)' --output-on-failure 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_aliased_depth$' # negative control: MultisampleTarget.hpp, DepthSurface.cpp, MultisampleTarget.cpp from main ninja -C build -j32 -l32 agc_driver_native_multisample_depth_tests agc_driver_recorder_tests ctest --test-dir build -R '^agc_driver_native_depth_aliased_depth$' --output-on-failure ctest --test-dir build -R '^agc_map_gate_disjoint$' --repeat until-fail:30 --output-on-failure # several times # restore merged files, rebuild the same targets, git status --porcelain ``` ## Results | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Configure, build, libs (script) | passed | | Selected tests (script) | 2192 ran, 2071 passed, 113 skips all expected. 7 known failures from `main`. 1 new failure: `agc_map_gate_disjoint` (see below) | | `agc_map_gate_disjoint` | Intermittent: failed on the 4th of 5 repeats with the merged tree. With `main`'s production files in place it failed again (`AGC graphics: (d) no watched block on other stripes`) on one of three 30-repeat loops. It does not come from this PR | | Native depth / multisample tests with the validation layer | 13 of 14 pass. `agc_driver_native_depth_bda_clear` skips (expected on lavapipe) | | `agc_driver_native_depth_aliased_depth` (verbose run with the validation layer) | passes in 1.3 s, `cases checked=412 unavailable=230`. The layer loaded and there is no `was not found` line. No `VUID-` lines | | Script's validation comparison | 768 tests, layer loaded in 767, `layer_missing_in` empty, no new VUIDs | <details><summary>agc_map_gate_disjoint with main's production files</summary> ``` Test #1921: agc_map_gate_disjoint ............***Failed 0.15 sec AGC graphics: (d) no watched block on other stripes ``` </details> ## Negative control I restored `MultisampleTarget.hpp`, `DepthSurface.cpp` and `MultisampleTarget.cpp` from `main` and rebuilt. `agc_driver_native_depth_aliased_depth` then fails on the first acceptance case: <details><summary>output</summary> ``` [gpu] native multisample depth 0x7fed4b6b0000+0x10000 aliases multisampled colour target 0x7fed4b6b0000+0x10000 (vk format 100, 4 samples), newest clear 0x3e800000 0x00000000 0x00000000 0x00000000 AGC graphics: native multisample depth or HTILE aliases a multisampled colour target whose samples are only on the host ``` </details> I then restored the merged files and rebuilt. `git status --porcelain` is empty. ## Findings ### Blocking None. ### Non-blocking 1. **A partial fill after import is not refused when the recorded alias was `Unknown`.** See `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:125-132` ([head](https://github.com/boykopovar/AnyPS5/blob/b3a54b169f82c0b4a62673438132248a2c9abf3b/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp#L122-L129)). - `soleDepthAlias` accepts the alias whatever its newest content, including `Unknown`. `Alias()` returns `Unknown` while the target has a colour-fill, CMASK or HTILE refusal (`MultisampleTarget.cpp:650`). - Suppose the target is recorded as `Unknown` and then notes another partial fill. `newest` stays `Unknown`, both values are empty and `contents` doesn't change, so `sameDepthAlias` returns true. It never compares `fills` unless the recorded content was `Clear`. - The new debt entry says sampling "refuses at the next sample once that target … takes any fill but one or more identical ones over its whole range". In this case it does not. - The depth read still comes from the HTILE-proved clear, and guest writes over the plane are still caught by the final `UnchangedSinceAll` check. So this is a gap between the code and the debt text, not a wrong depth value I could show. - Suggested fix: add `(current.fills == recorded.fills || refilled)` to the return condition, with a case for an `Unknown` alias followed by a partial fill. 2. **`agc_driver_native_depth_aliased_depth` is near the 30 s limit on another runner.** TechLevelZero's NVIDIA bot reported it at the 30.1 s timeout in its parallel validation run on every head since 426f5d4. It passed only on retry, "also passed only on retry in 5 other runs in the last 7 days" at this head. On lavapipe here it takes 1.3 s (412 cases), so CI's 30 s rule is met. On hardware that runs 2, 4 and 8 samples the test has about 640 cases. CONTRIBUTING asks to split a test that gets close to the limit instead of relying on retries. Splitting `--aliased-depth` by sample count or HTILE layout into separate ctest entries would keep each well under 30 s. Other checks: - `contents` is only changed under `targetsMutex()`: `acquire`, the view and order-target helpers, and `MultisampleTargetStorageView`. `Alias()` reads it under the same lock, so I see no data race. - The ordering of `MultisampleColorTargetOver` is preserved: it takes the front of the new list, which matches the old first-match result. - No code comments were added, and the debt file has two new entries. - The checklist has Depends on, Fixes, Unblocks (PPSA02225 #4461), GPUs tested and AI-assisted lines. ## Not verified - I did not run the 2- and 8-sample cases: lavapipe supports only 1 and 4 samples, and 230 cases were unavailable. - I did not run any NVIDIA or AMD GPU, and launched no titles. The Ghost of Tsushima and Dave the Diver results are the author's and commenters' runs. - I did not compare the console behaviour of the HTILE fast-clear rule. The debt entry already records it as unmeasured. - I did not investigate why `agc_map_gate_disjoint` flakes, only that it also fails with `main`'s code. <!-- anyps5-bots job=3184 head=b3a54b169f82c0b4a62673438132248a2c9abf3b -->
XairRrR commented 2026-11-03 12:58:00 +00:00 (Migrated from github.com)

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

Review: APPROVED


Re-checked — approved

The only new commit, 69d9d231c6, merges main. The PR's code, test and debt changes are the same as at b3a54b169f, apart from where its test name sits in the cmake list. The merged tree builds and passes the focused tests with no new VUIDs.

What changed since my last review

  • One new commit: 69d9d231c6 Merge main into fix/agc-msaa-d32s8-depth-alias-htile-proof. The range-diff shows the five PR commits unchanged.
  • I compared the PR's diff against its base, before the merge (d1ae628…b3a54b1) and after it (4f41f4c…69d9d23). The only difference is in the two set_tests_properties lists in tests/cmake/agc_driver_native_multisample_depth_tests.cmake:
    • main has added agc_driver_native_depth_uniform_planes to both lists.
    • The PR now appends agc_driver_native_depth_aliased_depth after it.
    • DepthSurface.cpp, MultisampleTarget.*, NativeMultisampleDepth.cpp and the debt entries are unchanged in the PR's own diff.
  • The description now also reports xXPBSXx's RTX 4080 SUPER run, and the discussion has TechLevelZero's AMD bot report for b3a54b1. There were no author replies to my previous findings.

What I ran

Head 69d9d231c63641e3bd0d6151dcd206d1418b3026, main 4f41f4c375f5abb487dbd184fbc150f31994d762, merged tree 9a1456973e58a6546b22b57418a1590442e0d0ce. Debian 13 VM (2× Xeon Gold 6136), GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19).

git range-diff / git diff d1ae628bc2f62459cce1e9872ba5632c938c71f2...b3a54b169f82c0b4a62673438132248a2c9abf3b vs 4f41f4c375f5abb487dbd184fbc150f31994d762...69d9d231c63641e3bd0d6151dcd206d1418b3026
git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...69d9d231c63641e3bd0d6151dcd206d1418b3026
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_(aliased_depth|uniform_planes|aliased_stencil)$'
Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Configure, build, libs (script) passed
Selected tests (script) 2207 ran, 2086 passed. All 114 skips were expected. No new failures and no timeouts. The 7 known failures also fail on main
Script's validation comparison 771 tests. The layer loaded in 770, and layer_missing_in is empty. 0 tests with new VUIDs
aliased_depth, aliased_stencil, uniform_planes with the layer, verbose 3/3 pass. aliased_depth takes 1.0 s with cases checked=412 unavailable=230. The layer loaded 6 times, with no was not found

There is one VUID in that verbose run, VUID-vkCmdDispatch-groupCountX-00386, and it comes from agc_driver_native_depth_uniform_planes. That is main's test, which this PR doesn't change. The script's comparison shows it on main too (no new VUIDs).

The negative control was not rerun: the test and production code are unchanged since the previous control, which failed as expected with main's production files.

Previous findings

  1. A partial fill after import is not refused when the recorded alias was Unknown (non-blocking): Still open. sameDepthAlias (core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:127-133) is unchanged and compares fills only through refilled, which needs a recorded Clear. The suggested fix still applies: add (current.fills == recorded.fills || refilled) to the return condition, with a test case.
  2. agc_driver_native_depth_aliased_depth is near the 30 s limit on another runner (non-blocking): Still open. The test is unchanged, so it still has about 640 cases on hardware that supports 2, 4 and 8 samples. On TechLevelZero's NVIDIA bot it timed out in the parallel validation run at heads 426f5d4 through b3a54b1 and passed only on retry. That bot's AMD run on b3a54b1 did not list it as slow. On lavapipe here it takes 1.0 s.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • I did not run the 2- and 8-sample cases: lavapipe has only 1 and 4 samples, so 230 cases were unavailable.
  • I ran no NVIDIA or AMD GPU and launched no titles. The title runs in the description are other people's results.
  • The console behaviour of the HTILE fast-clear rule is not measured. The debt entry already records that.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5752538216 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9742#pullrequestreview-5752538216). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T12:58:00Z. **Review:** APPROVED --- # Re-checked — approved The only new commit, 69d9d231c6, merges `main`. The PR's code, test and debt changes are the same as at b3a54b169f, apart from where its test name sits in the cmake list. The merged tree builds and passes the focused tests with no new VUIDs. ## What changed since my last review - One new commit: `69d9d231c6 Merge main into fix/agc-msaa-d32s8-depth-alias-htile-proof`. The range-diff shows the five PR commits unchanged. - I compared the PR's diff against its base, before the merge (`d1ae628…b3a54b1`) and after it (`4f41f4c…69d9d23`). The only difference is in the two `set_tests_properties` lists in `tests/cmake/agc_driver_native_multisample_depth_tests.cmake`: - `main` has added `agc_driver_native_depth_uniform_planes` to both lists. - The PR now appends `agc_driver_native_depth_aliased_depth` after it. - `DepthSurface.cpp`, `MultisampleTarget.*`, `NativeMultisampleDepth.cpp` and the debt entries are unchanged in the PR's own diff. - The description now also reports xXPBSXx's RTX 4080 SUPER run, and the discussion has TechLevelZero's AMD bot report for b3a54b1. There were no author replies to my previous findings. ## What I ran Head `69d9d231c63641e3bd0d6151dcd206d1418b3026`, `main` `4f41f4c375f5abb487dbd184fbc150f31994d762`, merged tree `9a1456973e58a6546b22b57418a1590442e0d0ce`. Debian 13 VM (2× Xeon Gold 6136), GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19). ``` git range-diff / git diff d1ae628bc2f62459cce1e9872ba5632c938c71f2...b3a54b169f82c0b4a62673438132248a2c9abf3b vs 4f41f4c375f5abb487dbd184fbc150f31994d762...69d9d231c63641e3bd0d6151dcd206d1418b3026 git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...69d9d231c63641e3bd0d6151dcd206d1418b3026 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_(aliased_depth|uniform_planes|aliased_stencil)$' ``` | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Configure, build, libs (script) | passed | | Selected tests (script) | 2207 ran, 2086 passed. All 114 skips were expected. No new failures and no timeouts. The 7 known failures also fail on `main` | | Script's validation comparison | 771 tests. The layer loaded in 770, and `layer_missing_in` is empty. 0 tests with new VUIDs | | `aliased_depth`, `aliased_stencil`, `uniform_planes` with the layer, verbose | 3/3 pass. `aliased_depth` takes 1.0 s with `cases checked=412 unavailable=230`. The layer loaded 6 times, with no `was not found` | There is one VUID in that verbose run, `VUID-vkCmdDispatch-groupCountX-00386`, and it comes from `agc_driver_native_depth_uniform_planes`. That is `main`'s test, which this PR doesn't change. The script's comparison shows it on `main` too (no new VUIDs). The negative control was not rerun: the test and production code are unchanged since the previous control, which failed as expected with `main`'s production files. ## Previous findings 1. **A partial fill after import is not refused when the recorded alias was `Unknown`** (non-blocking): **Still open.** `sameDepthAlias` (`core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:127-133`) is unchanged and compares `fills` only through `refilled`, which needs a recorded `Clear`. The suggested fix still applies: add `(current.fills == recorded.fills || refilled)` to the return condition, with a test case. 2. **`agc_driver_native_depth_aliased_depth` is near the 30 s limit on another runner** (non-blocking): **Still open.** The test is unchanged, so it still has about 640 cases on hardware that supports 2, 4 and 8 samples. On TechLevelZero's NVIDIA bot it timed out in the parallel validation run at heads 426f5d4 through b3a54b1 and passed only on retry. That bot's AMD run on b3a54b1 did not list it as slow. On lavapipe here it takes 1.0 s. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - I did not run the 2- and 8-sample cases: lavapipe has only 1 and 4 samples, so 230 cases were unavailable. - I ran no NVIDIA or AMD GPU and launched no titles. The title runs in the description are other people's results. - The console behaviour of the HTILE fast-clear rule is not measured. The debt entry already records that. <!-- anyps5-bots job=3338 head=69d9d231c63641e3bd0d6151dcd206d1418b3026 -->
XairRrR commented 2026-11-03 15:06:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T15:06:23Z.

Review: APPROVED


Re-checked — approved

There are two new commits. 9b5252fa33 adds a fill-count condition to sameDepthAlias, with a new UnknownThenPartialFill test case. 5ca95d6cb0 splits agc_driver_native_depth_aliased_depth into three ctest entries, one per HTILE layout. Both fix the points from my last review, and the merged tree passes with no new VUIDs.

What changed since my last review

  • Range-diff: the five earlier PR commits are unchanged. Two commits are new:
    • 9b5252fa33, in DepthSurface.cpp, adds (current.fills == recorded.fills || refilled) to the return condition of sameDepthAlias. In the merged tree, the change between 9b5252fa33^ and now in DepthSurface.cpp is exactly that one line.
    • 5ca95d6cb0, a test-only commit:
      • --aliased-depth now takes depth-only, stencil or no-stencil.
      • It is registered as agc_driver_native_depth_aliased_depth_depth_only, _stencil and _no_stencil. All three are in both set_tests_properties lists (TIMEOUT 30, and the Windows PATH).
      • The unavailable counts per sample count grow by one (27 and 29), to match the new case.
  • Author's reply: the comment of 2026-11-03T14:49 answers both of my earlier points, and the description records the red run on c6de43b107.

What I ran

Head 5ca95d6cb011c9a86fac6f192bbe423c14fee35a, main 4f41f4c375f5abb487dbd184fbc150f31994d762, merged tree 36cec05c99061061b51d8a2551418172864b1086.

Machine: Debian 13 VM (2× Xeon Gold 6136), GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19).

git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...5ca95d6cb011c9a86fac6f192bbe423c14fee35a
python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762
git diff 69d9d231c63641e3bd0d6151dcd206d1418b3026 36cec05c99061061b51d8a2551418172864b1086 --stat
git diff 9b5252fa33^ 36cec05c99061061b51d8a2551418172864b1086 -- core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
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_aliased_(depth_depth_only|depth_stencil|depth_no_stencil|stencil)$'
# negative control
git show 9b5252fa33^:core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
ninja -C build agc_driver_native_multisample_depth_tests
ctest --test-dir build --output-on-failure -R '^agc_driver_native_depth_aliased_depth_'
git show 36cec05c99061061b51d8a2551418172864b1086:core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
ninja -C build agc_driver_native_multisample_depth_tests
ctest --test-dir build -R '^agc_driver_native_depth_aliased_depth_'
git status --porcelain
Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Configure, build, libs (script) passed
Selected tests (script) 2209 ran and 2088 passed. All 114 skips were expected. There were no new failures and no timeouts. The 7 known failures also fail on main.
Script's validation comparison 773 tests. The layer loaded in 772, and layer_missing_in is empty. 0 tests have new VUIDs.
Three new entries and aliased_stencil, with the layer, verbose 4/4 pass, in 0.44 s, 0.54 s and 0.52 s (aliased_stencil 0.49 s). Cases checked: depth-only 104, stencil 168, no-stencil 156. The layer was inserted 16 times. There was no was not found line and no VUID- line.
Negative control (only the new condition reverted) All three entries fail with multisample target refusal did not match native multisample depth or HTILE aliases …
After restoring the merged tree 3/3 pass, and git status --porcelain is empty

Previous findings

  1. A partial fill after import is not refused when the recorded alias was Unknown (non-blocking): Resolved.
    • sameDepthAlias now also requires current.fills == recorded.fills || refilled (core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:133).
    • The new UnknownThenPartialFill case (core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp:2106) records the alias as Unknown with a half-range fill before import, notes another half-range fill after it, and expects the depth-alias refusal.
    • With only that line reverted, all three entries fail on the refusal mismatch. This matches the author's red run on c6de43b107, which I accept as author-reported for GitHub's runner.
  2. agc_driver_native_depth_aliased_depth is near the 30 s limit on another runner (non-blocking): Resolved.
    • The test now runs as three ctest entries, one per HTILE layout (core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_native_multisample_depth_tests.cmake:12-14).
    • Each entry gets the 30 s timeout.
    • On hardware with 2, 4 and 8 samples, the largest entry (the stencil layout, three HTILE words) runs about 40 % of the old single entry's cases.
    • Here each entry takes about 0.5 s. I have not timed them on the NVIDIA bot.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • I did not run the 2- and 8-sample cases: lavapipe exposes only 1 and 4 samples, so they count as unavailable here.
  • I did not time the split entries on the RTX 2000 Ada bot under its parallel validation run. The author also says they have not.
  • I ran no NVIDIA or AMD GPU and launched no titles. The title runs in the description are other people's results.
  • The console behaviour of the HTILE fast-clear rule is not measured. The debt entry already records that.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5754545377 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9742#pullrequestreview-5754545377). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T15:06:23Z. **Review:** APPROVED --- # Re-checked — approved There are two new commits. 9b5252fa33 adds a fill-count condition to `sameDepthAlias`, with a new `UnknownThenPartialFill` test case. 5ca95d6cb0 splits `agc_driver_native_depth_aliased_depth` into three ctest entries, one per HTILE layout. Both fix the points from my last review, and the merged tree passes with no new VUIDs. ## What changed since my last review - **Range-diff:** the five earlier PR commits are unchanged. Two commits are new: - **9b5252fa33**, in `DepthSurface.cpp`, adds `(current.fills == recorded.fills || refilled)` to the return condition of `sameDepthAlias`. In the merged tree, the change between 9b5252fa33^ and now in `DepthSurface.cpp` is exactly that one line. - **5ca95d6cb0**, a test-only commit: - `--aliased-depth` now takes `depth-only`, `stencil` or `no-stencil`. - It is registered as `agc_driver_native_depth_aliased_depth_depth_only`, `_stencil` and `_no_stencil`. All three are in both `set_tests_properties` lists (TIMEOUT 30, and the Windows `PATH`). - The `unavailable` counts per sample count grow by one (27 and 29), to match the new case. - **Author's reply:** the comment of 2026-11-03T14:49 answers both of my earlier points, and the description records the red run on c6de43b107. ## What I ran Head `5ca95d6cb011c9a86fac6f192bbe423c14fee35a`, `main` `4f41f4c375f5abb487dbd184fbc150f31994d762`, merged tree `36cec05c99061061b51d8a2551418172864b1086`. Machine: Debian 13 VM (2× Xeon Gold 6136), GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19). ``` git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...5ca95d6cb011c9a86fac6f192bbe423c14fee35a python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762 git diff 69d9d231c63641e3bd0d6151dcd206d1418b3026 36cec05c99061061b51d8a2551418172864b1086 --stat git diff 9b5252fa33^ 36cec05c99061061b51d8a2551418172864b1086 -- core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp 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_aliased_(depth_depth_only|depth_stencil|depth_no_stencil|stencil)$' # negative control git show 9b5252fa33^:core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp ninja -C build agc_driver_native_multisample_depth_tests ctest --test-dir build --output-on-failure -R '^agc_driver_native_depth_aliased_depth_' git show 36cec05c99061061b51d8a2551418172864b1086:core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp ninja -C build agc_driver_native_multisample_depth_tests ctest --test-dir build -R '^agc_driver_native_depth_aliased_depth_' git status --porcelain ``` | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Configure, build, libs (script) | passed | | Selected tests (script) | 2209 ran and 2088 passed. All 114 skips were expected. There were no new failures and no timeouts. The 7 known failures also fail on `main`. | | Script's validation comparison | 773 tests. The layer loaded in 772, and `layer_missing_in` is empty. 0 tests have new VUIDs. | | Three new entries and `aliased_stencil`, with the layer, verbose | 4/4 pass, in 0.44 s, 0.54 s and 0.52 s (`aliased_stencil` 0.49 s). Cases checked: depth-only 104, stencil 168, no-stencil 156. The layer was inserted 16 times. There was no `was not found` line and no `VUID-` line. | | Negative control (only the new condition reverted) | All three entries fail with `multisample target refusal did not match native multisample depth or HTILE aliases …` | | After restoring the merged tree | 3/3 pass, and `git status --porcelain` is empty | ## Previous findings 1. **A partial fill after import is not refused when the recorded alias was `Unknown`** (non-blocking): **Resolved.** - `sameDepthAlias` now also requires `current.fills == recorded.fills || refilled` (`core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:133`). - The new `UnknownThenPartialFill` case (`core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp:2106`) records the alias as `Unknown` with a half-range fill before import, notes another half-range fill after it, and expects the depth-alias refusal. - With only that line reverted, all three entries fail on the refusal mismatch. This matches the author's red run on c6de43b107, which I accept as author-reported for GitHub's runner. 2. **`agc_driver_native_depth_aliased_depth` is near the 30 s limit on another runner** (non-blocking): **Resolved.** - The test now runs as three ctest entries, one per HTILE layout (`core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_native_multisample_depth_tests.cmake:12-14`). - Each entry gets the 30 s timeout. - On hardware with 2, 4 and 8 samples, the largest entry (the stencil layout, three HTILE words) runs about 40 % of the old single entry's cases. - Here each entry takes about 0.5 s. I have not timed them on the NVIDIA bot. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - I did not run the 2- and 8-sample cases: lavapipe exposes only 1 and 4 samples, so they count as unavailable here. - I did not time the split entries on the RTX 2000 Ada bot under its parallel validation run. The author also says they have not. - I ran no NVIDIA or AMD GPU and launched no titles. The title runs in the description are other people's results. - The console behaviour of the HTILE fast-clear rule is not measured. The debt entry already records that. <!-- anyps5-bots job=3395 head=5ca95d6cb011c9a86fac6f192bbe423c14fee35a -->
XairRrR commented 2026-11-03 23:29:09 +00:00 (Migrated from github.com)

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

Review: APPROVED


Re-checked — approved

The only new commit is a merge of main (a8c64b9c3b, main 04a9eb4fa2 with #13021). In this PR's own lines, its one change is that MultisampleColorTargetsOver now takes #13021's TargetsLock. The merged tree builds, the aliased-depth tests pass under the validation layer with no VUID- lines, and the PR's tests still fail when its production files are reverted.

What changed since my last review

  • Range-diff: the seven PR commits I reviewed last time (219e925509 … 5ca95d6cb0) are unchanged. The only new commit is the merge a8c64b9c3b.
  • Merge resolution in this PR's lines:
    • MultisampleColorTargetsOver takes TargetsLock (core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp:1771). TargetsLock (:1009-1013) wraps the same targetsMutex() lock and also sets targetsMutexHeld, which HoldsMultisampleTargetsLock() (:1633) reports.
    • So #13021's publication guard (DepthSurface.cpp:2960) also sees this lookup as holding the lock, like every other acquirer in that file.
    • The declaration in MultisampleTarget.hpp sits next to WithMultisampleTargetsLockForTest.
    • The debt file keeps #13021's entry and its edit, followed by this PR's two entries (diff unchanged).
  • Description: a new Tested bullet for a8c64b9c3b (author-reported ×10 on GitHub's runners, which I accept as reported), and a Depends-on line noting #13021 has merged.
  • No new author replies to my previous review.

What I ran

Head a8c64b9c3b81d1e60885447652b88e13ba1e88a4, main 1c8c0efc8c41314402e6966da5bev6ea3d639d10, merged tree f62b1275f286c5975479ae76f707dbb314e3db08. Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19).

git diff --check 1c8c0efc8c41314402e6966da5bef6ea3d639d10...a8c64b9c3b81d1e60885447652b88e13ba1e88a4
python3 tools/check_conventions.py --base 1c8c0efc8c41314402e6966da5bef6ea3d639d10
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_(aliased_|publication$)'
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -V -R '^agc_driver_image_gather_volume$'
# negative control and VUID control: the PR's production files from main
git show 1c8c0efc8c:<MultisampleTarget.hpp, MultisampleTarget.cpp, DepthSurface.cpp> > <same paths>
ninja -C build -j32 -l32 agc_driver_image_gather_volume_tests agc_driver_native_multisample_depth_tests
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -V -R '^agc_driver_image_gather_volume$'
ctest --test-dir build --output-on-failure -R '^agc_driver_native_depth_aliased_depth_'
# restore
git show f62b1275f2:<same paths> > <same paths>
ninja -C build -j32 -l32 agc_driver_image_gather_volume_tests agc_driver_native_multisample_depth_tests
ctest --test-dir build -R '^agc_driver_native_depth_aliased_depth_'
git status --porcelain
Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Configure, build, libs (script) passed
Selected tests (script) 2238 ran, 2115 passed. All 116 skips were expected. No new failures and no timeouts. The 7 known failures also fail on main.
Script's validation comparison 787 tests, layer loaded in 786, layer_missing_in empty. One test is flagged, agc_driver_image_gather_volume, marked "test not run on main" (see below).
The three aliased-depth entries, aliased_stencil and #13021's publication, with the layer 5/5 pass, each in under 1 s. Cases checked: depth-only 104, stencil 168, no-stencil 156. Layer inserted 18 times, no was not found, no VUID- lines.
agc_driver_image_gather_volume VUIDs The same four VkSamplerCreateInfo addressMode IDs appear, with the same counts, with the PR's three production files reverted to main. So they come from main, not from this PR. The PR doesn't touch sampler creation either.
Negative control With the PR's production files from main, all three aliased_depth_* entries fail.
After restoring the merged files 3/3 pass, and git status --porcelain is empty

Previous findings

My previous review (of 5ca95d6cb0) had no open findings. The two earlier ones were already resolved there and are unchanged in this head.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • 2- and 8-sample cases: not run, because lavapipe exposes only 1 and 4 samples.
  • Other GPUs: I ran no NVIDIA or AMD GPU and launched no titles. The bots have not reported on a8c64b9c3b in the discussion yet.
  • Failure message of the negative control: I confirmed that the three entries fail, but did not keep their failure text this time. Last review it was the depth-alias refusal mismatch.
  • Console behaviour: the HTILE fast-clear rule is not measured on the console. The debt entry already records that.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5760956017 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9742#pullrequestreview-5760956017). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T23:29:09Z. **Review:** APPROVED --- # Re-checked — approved The only new commit is a merge of `main` (a8c64b9c3b, `main` 04a9eb4fa2 with #13021). In this PR's own lines, its one change is that `MultisampleColorTargetsOver` now takes #13021's `TargetsLock`. The merged tree builds, the aliased-depth tests pass under the validation layer with no `VUID-` lines, and the PR's tests still fail when its production files are reverted. ## What changed since my last review - **Range-diff:** the seven PR commits I reviewed last time (219e925509 … 5ca95d6cb0) are unchanged. The only new commit is the merge a8c64b9c3b. - **Merge resolution in this PR's lines:** - `MultisampleColorTargetsOver` takes `TargetsLock` (`core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp:1771`). `TargetsLock` (`:1009-1013`) wraps the same `targetsMutex()` lock and also sets `targetsMutexHeld`, which `HoldsMultisampleTargetsLock()` (`:1633`) reports. - So #13021's publication guard (`DepthSurface.cpp:2960`) also sees this lookup as holding the lock, like every other acquirer in that file. - The declaration in `MultisampleTarget.hpp` sits next to `WithMultisampleTargetsLockForTest`. - The debt file keeps #13021's entry and its edit, followed by this PR's two entries (diff unchanged). - **Description:** a new Tested bullet for a8c64b9c3b (author-reported ×10 on GitHub's runners, which I accept as reported), and a Depends-on line noting #13021 has merged. - No new author replies to my previous review. ## What I ran Head `a8c64b9c3b81d1e60885447652b88e13ba1e88a4`, `main` `1c8c0efc8c41314402e6966da5bev6ea3d639d10`, merged tree `f62b1275f286c5975479ae76f707dbb314e3db08`. Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19). ``` git diff --check 1c8c0efc8c41314402e6966da5bef6ea3d639d10...a8c64b9c3b81d1e60885447652b88e13ba1e88a4 python3 tools/check_conventions.py --base 1c8c0efc8c41314402e6966da5bef6ea3d639d10 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_(aliased_|publication$)' env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -V -R '^agc_driver_image_gather_volume$' # negative control and VUID control: the PR's production files from main git show 1c8c0efc8c:<MultisampleTarget.hpp, MultisampleTarget.cpp, DepthSurface.cpp> > <same paths> ninja -C build -j32 -l32 agc_driver_image_gather_volume_tests agc_driver_native_multisample_depth_tests env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -V -R '^agc_driver_image_gather_volume$' ctest --test-dir build --output-on-failure -R '^agc_driver_native_depth_aliased_depth_' # restore git show f62b1275f2:<same paths> > <same paths> ninja -C build -j32 -l32 agc_driver_image_gather_volume_tests agc_driver_native_multisample_depth_tests ctest --test-dir build -R '^agc_driver_native_depth_aliased_depth_' git status --porcelain ``` | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Configure, build, libs (script) | passed | | Selected tests (script) | 2238 ran, 2115 passed. All 116 skips were expected. No new failures and no timeouts. The 7 known failures also fail on `main`. | | Script's validation comparison | 787 tests, layer loaded in 786, `layer_missing_in` empty. One test is flagged, `agc_driver_image_gather_volume`, marked "test not run on main" (see below). | | The three aliased-depth entries, `aliased_stencil` and #13021's `publication`, with the layer | 5/5 pass, each in under 1 s. Cases checked: depth-only 104, stencil 168, no-stencil 156. Layer inserted 18 times, no `was not found`, no `VUID-` lines. | | `agc_driver_image_gather_volume` VUIDs | The same four `VkSamplerCreateInfo` addressMode IDs appear, with the same counts, with the PR's three production files reverted to `main`. So they come from `main`, not from this PR. The PR doesn't touch sampler creation either. | | Negative control | With the PR's production files from `main`, all three `aliased_depth_*` entries fail. | | After restoring the merged files | 3/3 pass, and `git status --porcelain` is empty | ## Previous findings My previous review (of 5ca95d6cb0) had no open findings. The two earlier ones were already resolved there and are unchanged in this head. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - **2- and 8-sample cases:** not run, because lavapipe exposes only 1 and 4 samples. - **Other GPUs:** I ran no NVIDIA or AMD GPU and launched no titles. The bots have not reported on a8c64b9c3b in the discussion yet. - **Failure message of the negative control:** I confirmed that the three entries fail, but did not keep their failure text this time. Last review it was the depth-alias refusal mismatch. - **Console behaviour:** the HTILE fast-clear rule is not measured on the console. The debt entry already records that. <!-- anyps5-bots job=3712 head=a8c64b9c3b81d1e60885447652b88e13ba1e88a4 -->
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!9742
No description provided.