fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9742"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
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_CLEAR0.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:
DB_DEPTH_CLEAR, the title's own register.The change:
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 provesDB_DEPTH_CLEAR; in the depth and stencil layout every word masked with0xfffff00f(Z range and ZMask) must be0for 0.0 or0xfffc0000for 1.0, the words of Mesa'sradv_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.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.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 onmainwith #9533's targets (JJenkx's prints in D#8691 and D#9091, after his bisect toa4b76b2c0a; our reply).Overlap: checked with
git merge-treeand the overlap tool.mainnow. This PR's own commit adds nothing to them. With #8223, both conflicts (DepthSurfaceView's signature andguard()) are #9533's own, and the same at514643ab16.CMakeLists.txt,NativeMultisampleDepth.cppand the debt file. Keeping both sides resolves them. #9717 merged first, and the merge ofmain88e804b0a7(see Tested) keeps both PRs' additions.1d16d5029d(b39dbaecdb) needed only #9533's debt entry, where both sides' edits are kept, and9afaa90c1f(39b338cf45) merged cleanly, anda45dff8d51(9334be4972), #9533's merge ofmainwith #6727, again needed only #9533's debt entry, where both sides' edits are kept. Merging1582cf6cc0(07007fdc45), #9533's queued-fill skip, needed only that entry once more, and both sides' words are kept.DepthSurface.cpporMultisampleTarget.*(#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.add_library_testand moves test files. The order is proposed in its thread (comment): this PR first; if #6044 lands first,agc_driver_native_depth_aliased_depthis registered withadd_library_test(graphics ...)at this PR's next merge ofmain.PS_ITER_SAMPLEprogram into a one-sample target. Each merges cleanly with this head and with #9533 (git merge-treeagainst 2620f8d62e and c974601a60), so no order is needed between them.main04a9eb4fa2(see Tested) keeps both sides inMultisampleTarget.hppand.cppand in the AGC debt file: this PR'sMultisampleColorTargetsOvertakes #13021'sTargetsLock, 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.[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.DepthSurface.cpp, in the index-0 branch ofprepareDepthSamplingand ofCheckCurrent, and the test-list cmake.DB_DEPTH_CLEAR. InCheckCurrent, this PR'ssameDepthAliascomes first, then #15443's value re-proof.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 ofmainafter #15443 turns that step into an accepted case.CMakeLists.txtand the AGC debt file are shared with many PRs, by neighbouring lines only.Tested
agc_driver_native_depth_aliased_depthhas 10 cases atDB_DEPTH_CLEAR0.0 and 1.0 on a D32S8 target with a separate stencil plane and a pipe-aligned depth-only HTILE:DB_DEPTH_CLEARin every sample:DB_DEPTH_CLEAR;DepthSurface.cppandMultisampleTarget.*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".514643ab16) against this PR (CONTRIBUTING's AGC rule), on one GitHub Linux runner (run):VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andctest -V. The device was llvmpipe (LLVM 20.1.2) on Mesa 25.2.8, Ubuntu 24.04.5.VK_LAYER_KHRONOS_validation16 times on #9533's tree and 18 with this PR. Neither log haswas not found but was requested by env var VK_INSTANCE_LAYERS.VUID-VkDeviceCreateInfo-pNext-pNext. This PR adds noVUID-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.ANYPS5_REQUIRE_VULKAN=1; GPU clocks weren't held, pass/fail only):agc_driver_native_depth_aliased_depthpasses 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, exceptagc_driver_native_depth_driver_queued_fill: on Windows that queued fill refuses, as onmain, and #9533 now skips the case there with the reason (1582cf6cc0; see #9533).219e925509(comment): Linux, RTX 4070 Ti, NVIDIA 615.71.09, release libraries, 16 GB cap, warm and cold.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).test/ghost-9742-9717(3ec696f7fe: this PR's219e925509and #9717's767374011f, both on514643ab16; comment). Same setup, warm at 16 GB and cold at 20 GB.a color target's sample count differs from the rasterizer's, which milescoviello's #8115 handles.MaskedSelectEliminator::Eliminate, not in this PR's code.b39dbaecdb, #9533's head1d16d5029dmerged 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 bygit diff -U0patch-id), on GitHub's runners (run):agc_driver_native_depth_aliased_depthpass 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 foragc_driver_native_depth_aliased_depthis the one in the first GitHub run above.VK_LAYER_KHRONOS_validation21 times on #9533's tree and 230 with this PR, and neither log haswas not found. Both logs report onlyVUID-VkDeviceCreateInfo-pNext-pNext, so this PR adds noVUID-message.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.mainb7d1d47a5fagainstb39dbaecdb(run), the same 14 tests once on one GitHub Linux runner.main's tree ran the 7 of them it has. The loader insertedVK_LAYER_KHRONOS_validation11 times onmainand 23 with this head, and neither log haswas not found. Both logs report onlyVUID-VkDeviceCreateInfo-pNext-pNext, so the stack adds noVUID-message againstmain.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.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.39b338cf45, #9533's head9afaa90c1fmerged in (main11f976b27c; clean, and this PR's own changes are the same bygit diff -U0patch-id), on GitHub's runners (run):agc_driver_native_depth_aliased_depthpass 10 of 10, none skipped.mainagainst this head, in the same run:main's tree ran the 7 of these tests it has. The loader insertedVK_LAYER_KHRONOS_validation11 times onmainand 230 with this head, and neither log haswas not found. Both logs report onlyVUID-VkDeviceCreateInfo-pNext-pNext, so this PR adds noVUID-message.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.9334be4972, #9533's heada45dff8d51merged in (maind6e7ab42df, which brings #6727; this PR's own changes are the same bygit diff -U0), on GitHub's runners (run):agc_driver_native_depth_aliased_depthpass 10 of 10, none skipped. #9533'sagc_driver_native_depth_stencilfixture 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.mainagainst this head, in the same run:main's tree ran the 7 of these tests it has. The loader insertedVK_LAYER_KHRONOS_validation11 times onmainand 230 with this head, and neither log haswas not found. Both logs report onlyVUID-VkDeviceCreateInfo-pNext-pNext, so this PR adds noVUID-message.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.07007fdc45, #9533's head1582cf6cc0merged in (#9533's queued-fill skip; this PR's own changes outside #9533's debt entry are the same bygit diff -U0, and that entry keeps every word of both sides), on GitHub's runners (run):agc_driver_native_depth_aliased_depthpass 10 of 10, none skipped.mainagainst this head, in the same run:main's tree ran the 7 of these tests it has. The loader insertedVK_LAYER_KHRONOS_validation11 times onmainand 230 with this head, and neither log haswas not found. Both logs report onlyVUID-VkDeviceCreateInfo-pNext-pNext, so this PR adds noVUID-message.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.9fc4f50e1e, #9533's head53886418d9merged 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):agc_driver_native_depth_aliased_depthfails with #9533's code. With this PR it and the other native depth and native multisample depth tests pass 10 of 10, withagc_driver_native_depth_bda_clearskipping on llvmpipe, as onmain.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.d658354769, a merge of #9533'sde4cee5626, which mergesmain0db47b263d. No conflicts. On GitHub's runners (run), of theagc_driver_native_depth*andagc_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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_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's55b0a5f4ad, which mergesmain3fcb5e4d76and 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_2and_8, andagc_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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.main17f5335562it stops onnative 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 latermain, that stop is gone, and the run stops later in the same compute shader, 0x20001ef700, onnative multisample depth sampled identity or format mismatch, as in milescoviello's Linux run above.main(comment):main2dc85609fcwith #9717 (and #9533 under it), this PR'sb3e6311c1f(its conflicts with #9717 inCMakeLists.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.mainwith #9533 and #9717 on the same base stops at 40 s onnative multisample depth or HTILE aliases a multisampled colour target whose samples are only on the host.is not implementedline, 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 ofmain(f7569e7ce1) (run). No conflict of its own; this PR's diff over #9533 is unchanged. Theagc_driver_native_,agc_driver_depth_andagc_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, andagc_driver_native_depth_bda_clearandagc_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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.4ef2217dba, the stencil-in-HTILE commit (run), onb991bae852.agc_driver_native_depth_aliased_depthnow runs every alias case with the stencil in HTILE (words0xf0and0for 0.0,0xfffc00f0for 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.b3e6311c1fbefore, 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.agc_driver_native_depthandagc_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 failsagc_driver_native_depth_aliased_depth. Windows: 34 run, 1 pass, 33 skip (no Vulkan device), 0 fail.guest_raise_in_system_calltimed out at 30 s, as it did in the same run'smainarm (222 of 223 pass). This PR changes nothing in libkernel. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.b3e6311c1f(same patch-id):agc_driver_native_depth_aliased_depthandagc_driver_native_depth_aliased_stencilwithVK_LAYER_KHRONOS_validationon both arms; the only VUID isVUID-VkDeviceCreateInfo-pNext-pNext, on both.3c22496168, a merge of #9533's head078e6a68d8(run). It takes #9533's merge ofmain, which brings in #9186's host-only flag forguard(). No conflict here. Theagc_driver_native_,agc_driver_depth_,agc_driver_msaa_andagc_driver_sampletests 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,mainwith 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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.2c0814e5eeand284d3a643b, the same-value fill commits (run), on3c22496168. 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.2c0814e5eekeeps the alias after one such fill and counts the fills a target notes;284d3a643bkeeps it through a run of them.agc_driver_native_depth_aliased_depthgains 15 cases in each of the 8 HTILE layouts: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. Before284d3a643b, 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.agc_driver_native_depth,agc_driver_depth_andagc_driver_native_multisampletests 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, failsagc_driver_native_depth_aliased_depth. Windows: 35 run, 1 pass, 34 skip (no Vulkan device), 0 fail.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.agc_driver_native_depth_aliased_depthandagc_driver_native_depth_aliased_stencilwithVK_LAYER_KHRONOS_validationon one GitHub Linux runner, 2 run, 2 pass, 0 skip; the only VUID on either arm isVUID-VkDeviceCreateInfo-pNext-pNext, as in earlier runs. Windows skips both (no Vulkan device).agc_driver_native_depth_aliased_depthwith these two commits passes withcases checked=642 unavailable=0on 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'sf39599c354, which mergesmain19af7f44e4(run, on 5c7cb36fce, a direct merge ofmaininto this branch with the same tree). The one conflict, inNativeMultisampleDepth.cpp, is #9533's: #10368 (Ondra97) addsCheckStorageAliasRetirementtoNativeMultisampleDepth.cppnext to theClearFaultenum #9533 extends withFillDuringClearand itsClearSourceenum. Both are kept, and this PR's changed lines are the same. Theagc_driver_native_depth,agc_driver_depth_andagc_driver_native_multisampletests, 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. WithVK_LAYER_KHRONOS_validationloaded on both arms on Linux, the only VUID isVUID-VkDeviceCreateInfo-pNext-pNext, on both. Suites: libc and libkernel pass on Linux (145 and 210) and on Windows (172 and 231). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.97c707a4f1, a merge of #9533'sa7697941f3, which mergesmainccfb96757f(run). One conflict, inMultisampleTarget.cpp: #11307 (dantdmdarealguy) returnsselectedViewwhere this PR incrementscontents; 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_sysandguest_timed_join_import_libkernel_webfail at their setup in the verify's Windows build (FileNotFoundErrorstarting the title, or copying the libraries they load), and pass inmain's own Windows job at1829def9bf(job). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.d1439b60b0, a merge of #9533's5343d0a8da(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).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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.f8af4b2173, a merge of #9533's6eb141ce5f, which mergesmain102b7a5cf0and with it Jamie's #12566 (run). The one conflict was the include block ofMultisampleTarget.hpp:main's<utility>joins this PR's<atomic>, and both sides add<vector>.MultisampleTarget.cppmerged cleanly, with #12566'sHostOnlySampleRangesnext to this PR'sMultisampleColorTargetOverandMultisampleColorTargetsOver. This PR's own diff is unchanged, apart from#include <vector>, whichmainnow has too. The native depth and multisample tests (^agc_driver_native_) andagc_frame_captureran 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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.f8af4b2173(CONTRIBUTING's AGC rule).426f5d4ffdchanges only the debt file. The comparison on currentmain, at1c904e29a2, is the last bullet.main102b7a5cf0, that head's base, againstf8af4b2173. Since thenmainhas changed onlylibSceAgcDriver/CMakeLists.txtand the debt file among this PR's paths.VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andctest -V.^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.VK_LAYER_KHRONOS_validation15 times onmainand 27 with the change, and neither log haswas not found. Both logs report onlyVUID-VkDeviceCreateInfo-pNext-pNext, and the change adds none.agc_driver_sample_multisample_target: it passes on both arms, with no new VUIDs (run). ×10 onf8af4b2173(run): Linux 10 of 10; Windows skips, since the runner has no Vulkan device.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.426f5d4ffd, the debt entries (docs only; the code's patch-id is unchanged):check_conventions.pyhas no errors, and its one remainingdebt-lengthwarning is #9533's entry, unchanged from6eb141ce5f.426f5d4ffd(run).1c904e29a2, a merge ofmain42d992b02a(clean; this PR's own diff is unchanged). Thatmainbrings milescoviello's #10854 (a079dec978), which addsOverwrittenOnGpu()to theDepthSurfaceTexturecondition inDepthSurface.cpp.^agc_driver_native_test, plusagc_driver_sample_multisample_targetandagc_frame_capture. Linux: 16 run, 14 pass, 2 skip (agc_driver_native_depth_bda_clearandagc_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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.main42d992b02aagainst1c904e29a2, the same tests, on GitHub's Linux runner (llvmpipe (LLVM 20.1.2), Mesa 25.2.8) withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andctest -V. The loader inserted the layer 16 times onmainand 28 with the change, and neither log haswas not found. Both logs report onlyVUID-VkDeviceCreateInfo-pNext-pNext, and the change adds none.main98ddd9c179+ #12840425cd9d8b0+ #97421c904e29a2(#9533's6eb141ce5finside), 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 nonative multisample stencil or depth format importstop. 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 isvkAllocateMemory 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'sdcf420ec7f, which brings #9533's merge ofmain2b1ae87c69and savvaniss's #8223 (run). Clean; this PR's own diff changes only in #9533'sguardedColorBytesposition.^agc_driver_native_,^agc_driver_msaa_and^agc_driver_depth_tests.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.ctest -R '^(agc|shader)'1,162 passed, 0 failed.1694dc0fd9, a merge of #9533's071ca5b609, which mergesmain6a691f69eeand with it Celegans12's #8105 (run, validation run). #9533's resolution, with its two test-file adaptations, is kept as is.CMakeLists.txt, whereagc_driver_native_depth_buffer_clearjoins this PR'sset_tests_propertieslists, which also carryagc_driver_native_depth_aliased_depth. Those two lines are the only change to this PR's own lines over #9533.agc_driver_native_multisample_depth,agc_driver_sample_multisample_targetand every^agc_driver_native_depthor^agc_driver_depth_planetest,agc_driver_native_depth_aliased_depthandagc_driver_native_depth_buffer_clearincluded.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.VERIFY_VALIDATION=1on GitHub's Linux runner),main6a691f69eeagainst this head, the same tests:main's arm ran the ones it has, and both pass. The loader insertedVK_LAYER_KHRONOS_validation28 times onmainand 40 with this head, and neither log haswas not found. Both report the same three IDs,VUID-VkDeviceCreateInfo-pNext-pNext,VUID-vkCmdCopyImage-srcImage-01548andVUID-vkCmdCopyImage-srcImage-01551, so the merge adds none.agc_driver_native_multisample_depth_testspass 120 of 120 runs;ctest -R '^(agc|shader)'1,091 passed, 75 skipped, 0 failed.d359d92d02, a merge of #9533's merge ofmain0836dfdf4f(run, on f3ee9e9725, which has the same tree). #12862 movedlibSceAgcDriver's test registrations intotests/cmake/; the conflict inCMakeLists.txtis resolved withtools/agc_test_split.py resolve, which moves this PR's registration intotests/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 -Ngives 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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.b3a54b169f, a merge ofmain88e804b0a7(run), which has #9533 and #9717. The three conflicts were both PRs' additions at the same places, and the merge keeps both: #9717'sCheckStencilViewwith its--stencil-viewcase and this PR'sCheckAliasedDepthwith its case inNativeMultisampleDepth.cpp, both tests in thetests/cmake/agc_driver_native_multisample_depth_tests.cmakelists, 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'sagc_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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners. TechLevelZero's NVIDIA bot ran this head merged ontomain88e804bon an RTX 2000 Ada (report): 2,550 passed, 5 failed, none new (3 also fail onmain, 2 unstable onmain), 45 skipped, with no new validation IDs (971 tests on the GPU). Its AMD bot ran it merged ontomain7feb37eon a Radeon RX 6300 (RADV NAVI24, Mesa 25.2.8; report): 2,710 passed, 9 failed, none new (8 also fail onmain, 1 unstable onmain), 58 skipped, with no new validation IDs (928 tests on the GPU).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. Onmainf6232fcfda, 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). Withb3a54b169fmerged onto the samemain, 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 shader0x20001f3500). 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 ofmain4f41f4c375(run).tests/cmake/agc_driver_native_multisample_depth_tests.cmake, wheremainaddsagc_driver_native_depth_uniform_planesto the twoset_tests_propertieslists that carry this PR'sagc_driver_native_depth_aliased_depth; the resolution is the union of the names, each once. Anddocs/dev/debt/libSceAgcDriver.md, where this PR's two entries andmain's new entries are adjacent, and both stay.main's name too.^agc_driver_native_depth,^agc_driver_native_multisampleor^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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.main4f41f4c. NVIDIA RTX 2000 Ada (driver 595.99.02; report): 2,746 passed, 6 failed, none new (3 also fail onmain, 3 unstable onmain), 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 onmain), 56 skipped, with no new validation IDs (979 tests on the GPU).9b5252fa33and5ca95d6cb0, for XairRrR's two open points (review).9b5252fa33(DepthSurface.cpp):sameDepthAliascompared 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_depthran 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 heads426f5d4throughb3a54b1, 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_stencilandagc_driver_native_depth_aliased_depth_no_stencil.^agc_driver_native_depth,^agc_driver_native_multisampleor^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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.a8c64b9c3b, a merge ofmain04a9eb4fa2, which brings JAB-dev's #13021 (run).MultisampleTarget.hpp: this PR'sMultisampleColorTargetsOverdeclaration and #13021'sWithMultisampleTargetsLockForTestboth stay.MultisampleTarget.cpp: #13021 takes the targets lock throughTargetsLock, which marks it held forHoldsMultisampleTargetsLock, so native depth publication refuses while it's held. This PR'sMultisampleColorTargetsOvernow takes the lock the same way, in place of a plainstd::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.mainis unchanged.^agc_driver_native_depth,^agc_driver_native_multisampleor^agc_driver_sample_multisample, which now takes in #13021'sagc_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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)main, after a 3D scene (see Tested).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:
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.Unblocksentry 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.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.CheckResource: 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).I can run #9717's head next if you'd like, warm and cold the same way.
AI-assisted: yes (Claude Code)
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.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-9717at 3ec696f7fe. It merges this PR's219e925509and #9717's767374011f, which are both on #9533's514643ab16. 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.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 currentmain(15 commits ahead). Its dependency #9533 is also currently conflicting withmain. 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:
Unblocksneeds the title’s Game bring-up discussion link, #4461, perCONTRIBUTING.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-lengthwarning 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.Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-22T15:19:49Z.
@EagleBearerYS Ghost of Tsushima (PPSA02225) on
test/ghost-9742-9717at3ec696f7fe, 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:
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
219e925509run didn't come back here. That crash was inShaderRecompiler::MaskedSelectEliminator::Eliminate,libSceAgcDriver.prx+0x77ac17, from the kernel log: a null next node while walking a block's instructions inremoveFullWaveSelects. 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)
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
Unblocksline 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 listsDepends on: #9533; please coordinate its order with #9717/#8115/#8121 as already discussed. This head is based onb7d1d47a5f, 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.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) @dc0c8db500plus #9533 @1582cf6cc0plus this PR's own diff over #9533 (head07007fdc45), notmain, sincemaindoes not build on macOS yet. Two drivers: Vulkan SDK 1.4.363.0 MoltenVK 1.4.2, and MoltenVKmainwith SPIRV-Cross #2704.ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1,ctest -j1 --timeout 30 -V.agc_driver_native_depth_aliased_depthfails withnative multisample depth or HTILE aliases a multisampled colour target whose samples are only on the hostagc_driver_native_depth_aliased_depthpasses:cases checked=40 unavailable=26, at 2 and 4 samplesctest -R 'native_depth|native_multisample_depth|depth_alias|msaa'(21 entries) with this PR: 19/21 on both drivers, withagc_driver_msaa_dcc_clear_8skipped.agc_driver_native_depth_driver_pathandagc_driver_native_depth_driver_queued_fillfrom #9533. Their cases pass, but the process aborts at exit on macOS (recursive_mutex lock failed: Invalid argumentfrom~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.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T08:21:08Z.
Review: CHANGES_REQUESTED
Rechecked current head
97c707a4f15131e65040e868bb55c9cd04fef3c7against livemain4c7d275bef89d309313d16bc2bc05d37a1b50be2and 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
markLayersPendingfix, so it does not isolate this PR or establish current-main equivalence.Changes requested
bebae5458621aa8943cb4ee14e513acffaa8d448), but since the PR baseccfb96757f9e31a8f4330cf25f193aae607d7409,mainhas 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.git merge-treebetween 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.git diff --checkpasses. Conventions reports one debt-length finding (zero errors); the same check passes on currentmain. I did not run local GPU tests. I have not treated the stacked title run as a standalone validation of this PR.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 relevantDepthSurface.cppchange on currentmain.What I ran
main; reviewed the supplied update at comment 6512092815.426f5d4ffdba8892a2ab0e7e2d979594ff5bf921against currentmain1a217758a55c09e817366fa4411daac854eeb3f9; merge base is102b7a5cf0ed98dd94d9da76862eb1ee7865a932and the merge tree is clean (f83863fd687c0acafd6813aba97d0c413f0837e2).git diff --check upstream/main...refs/review/upstream-9742andpython tools/check_conventions.py --base upstream/main --head refs/review/upstream-9742on Linux with Python 3.11.2. I did not build or run GPU tests locally.mainwith the reported test base for the PR paths. Currentmainhas aDepthSurface.cppchange in addition to CMake and debt-file changes.Results
f83863fd687c0acafd6813aba97d0c413f0837e2git diff --checkmainbase102b7a5cf0; not run against currentmainUnedited local check output
Findings
Blocking
mainaddsOverwrittenOnGpu()and uses it in theDepthSurfaceTexturerejection/retirement condition. This is in the sameDepthSurface.cppimplementation changed by this PR and was not present in the reported focused/validation base102b7a5cf0. The reported rerun atf8af4b2173and 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 currentmain1a217758a55c09e817366fa4411daac854eeb3f9and the exact PR stack, and report the exact tested revisions and any newVUID-messages.Non-blocking
Sources
DepthSurface.cppNot verified
To get this to a good state
Run the focused native-depth suite and the same
ctest -Vvalidation comparison on currentmainand the exact PR stack, withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1, andANYPS5_REQUIRE_VULKAN=1. I will re-check the new revisions, repeat the non-build checks above, and compare the validation output.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_depthpasses with the validation layer loaded and adds no new VUID. Withmain'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 withmain's code. I found two non-blocking points.What I ran
Head
b3a54b169f82c0b4a62673438132248a2c9abf3b,maind1ae628bc2f62459cce1e9872ba5632c938c71f2, merged tree30450dbe174f927b6bd4f7eff0c04ddce849e00d. Debian 13 VM (2× Xeon Gold 6136), GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19).Results
git diff --checkcheck_conventions.pymain. 1 new failure:agc_map_gate_disjoint(see below)agc_map_gate_disjointmain'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 PRagc_driver_native_depth_bda_clearskips (expected on lavapipe)agc_driver_native_depth_aliased_depth(verbose run with the validation layer)cases checked=412 unavailable=230. The layer loaded and there is nowas not foundline. NoVUID-lineslayer_missing_inempty, no new VUIDsagc_map_gate_disjoint with main's production files
Negative control
I restored
MultisampleTarget.hpp,DepthSurface.cppandMultisampleTarget.cppfrommainand rebuilt.agc_driver_native_depth_aliased_depththen fails on the first acceptance case:output
I then restored the merged files and rebuilt.
git status --porcelainis empty.Findings
Blocking
None.
Non-blocking
Unknown. Seecore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:125-132(head).soleDepthAliasaccepts the alias whatever its newest content, includingUnknown.Alias()returnsUnknownwhile the target has a colour-fill, CMASK or HTILE refusal (MultisampleTarget.cpp:650).Unknownand then notes another partial fill.neweststaysUnknown, both values are empty andcontentsdoesn't change, sosameDepthAliasreturns true. It never comparesfillsunless the recorded content wasClear.UnchangedSinceAllcheck. So this is a gap between the code and the debt text, not a wrong depth value I could show.(current.fills == recorded.fills || refilled)to the return condition, with a case for anUnknownalias followed by a partial fill.agc_driver_native_depth_aliased_depthis 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 since426f5d4. 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-depthby sample count or HTILE layout into separate ctest entries would keep each well under 30 s.Other checks:
contentsis only changed undertargetsMutex():acquire, the view and order-target helpers, andMultisampleTargetStorageView.Alias()reads it under the same lock, so I see no data race.MultisampleColorTargetOveris preserved: it takes the front of the new list, which matches the old first-match result.Not verified
agc_map_gate_disjointflakes, only that it also fails withmain's code.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T12:58:00Z.
Review: APPROVED
Re-checked — approved
The only new commit,
69d9d231c6, mergesmain. The PR's code, test and debt changes are the same as atb3a54b169f, 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
69d9d231c6 Merge main into fix/agc-msaa-d32s8-depth-alias-htile-proof. The range-diff shows the five PR commits unchanged.d1ae628…b3a54b1) and after it (4f41f4c…69d9d23). The only difference is in the twoset_tests_propertieslists intests/cmake/agc_driver_native_multisample_depth_tests.cmake:mainhas addedagc_driver_native_depth_uniform_planesto both lists.agc_driver_native_depth_aliased_depthafter it.DepthSurface.cpp,MultisampleTarget.*,NativeMultisampleDepth.cppand the debt entries are unchanged in the PR's own diff.b3a54b1. There were no author replies to my previous findings.What I ran
Head
69d9d231c63641e3bd0d6151dcd206d1418b3026,main4f41f4c375f5abb487dbd184fbc150f31994d762, merged tree9a1456973e58a6546b22b57418a1590442e0d0ce. Debian 13 VM (2× Xeon Gold 6136), GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19).git diff --checkcheck_conventions.pymainlayer_missing_inis empty. 0 tests with new VUIDsaliased_depth,aliased_stencil,uniform_planeswith the layer, verbosealiased_depthtakes 1.0 s withcases checked=412 unavailable=230. The layer loaded 6 times, with nowas not foundThere is one VUID in that verbose run,
VUID-vkCmdDispatch-groupCountX-00386, and it comes fromagc_driver_native_depth_uniform_planes. That ismain's test, which this PR doesn't change. The script's comparison shows it onmaintoo (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
Unknown(non-blocking): Still open.sameDepthAlias(core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:127-133) is unchanged and comparesfillsonly throughrefilled, which needs a recordedClear. The suggested fix still applies: add(current.fills == recorded.fills || refilled)to the return condition, with a test case.agc_driver_native_depth_aliased_depthis 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 heads426f5d4throughb3a54b1and passed only on retry. That bot's AMD run onb3a54b1did not list it as slow. On lavapipe here it takes 1.0 s.New findings
Blocking
None.
Non-blocking
None.
Not verified
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T15:06:23Z.
Review: APPROVED
Re-checked — approved
There are two new commits.
9b5252fa33adds a fill-count condition tosameDepthAlias, with a newUnknownThenPartialFilltest case.5ca95d6cb0splitsagc_driver_native_depth_aliased_depthinto 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
9b5252fa33, inDepthSurface.cpp, adds(current.fills == recorded.fills || refilled)to the return condition ofsameDepthAlias. In the merged tree, the change between9b5252fa33^ and now inDepthSurface.cppis exactly that one line.5ca95d6cb0, a test-only commit:--aliased-depthnow takesdepth-only,stencilorno-stencil.agc_driver_native_depth_aliased_depth_depth_only,_stenciland_no_stencil. All three are in bothset_tests_propertieslists (TIMEOUT 30, and the WindowsPATH).unavailablecounts per sample count grow by one (27 and 29), to match the new case.What I ran
Head
5ca95d6cb011c9a86fac6f192bbe423c14fee35a,main4f41f4c375f5abb487dbd184fbc150f31994d762, merged tree36cec05c99061061b51d8a2551418172864b1086.Machine: Debian 13 VM (2× Xeon Gold 6136), GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19).
git diff --checkcheck_conventions.pymain.layer_missing_inis empty. 0 tests have new VUIDs.aliased_stencil, with the layer, verbosealiased_stencil0.49 s). Cases checked: depth-only 104, stencil 168, no-stencil 156. The layer was inserted 16 times. There was nowas not foundline and noVUID-line.multisample target refusal did not match native multisample depth or HTILE aliases …git status --porcelainis emptyPrevious findings
Unknown(non-blocking): Resolved.sameDepthAliasnow also requirescurrent.fills == recorded.fills || refilled(core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:133).UnknownThenPartialFillcase (core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp:2106) records the alias asUnknownwith a half-range fill before import, notes another half-range fill after it, and expects the depth-alias refusal.agc_driver_native_depth_aliased_depthis near the 30 s limit on another runner (non-blocking): Resolved.core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_native_multisample_depth_tests.cmake:12-14).New findings
Blocking
None.
Non-blocking
None.
Not verified
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,main04a9eb4fa2with #13021). In this PR's own lines, its one change is thatMultisampleColorTargetsOvernow takes #13021'sTargetsLock. The merged tree builds, the aliased-depth tests pass under the validation layer with noVUID-lines, and the PR's tests still fail when its production files are reverted.What changed since my last review
219e925509…5ca95d6cb0) are unchanged. The only new commit is the mergea8c64b9c3b.MultisampleColorTargetsOvertakesTargetsLock(core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp:1771).TargetsLock(:1009-1013) wraps the sametargetsMutex()lock and also setstargetsMutexHeld, whichHoldsMultisampleTargetsLock()(:1633) reports.DepthSurface.cpp:2960) also sees this lookup as holding the lock, like every other acquirer in that file.MultisampleTarget.hppsits next toWithMultisampleTargetsLockForTest.a8c64b9c3b(author-reported ×10 on GitHub's runners, which I accept as reported), and a Depends-on line noting #13021 has merged.What I ran
Head
a8c64b9c3b81d1e60885447652b88e13ba1e88a4,main1c8c0efc8c41314402e6966da5bev6ea3d639d10, merged treef62b1275f286c5975479ae76f707dbb314e3db08. Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19).git diff --checkcheck_conventions.pymain.layer_missing_inempty. One test is flagged,agc_driver_image_gather_volume, marked "test not run on main" (see below).aliased_stenciland #13021'spublication, with the layerwas not found, noVUID-lines.agc_driver_image_gather_volumeVUIDsVkSamplerCreateInfoaddressMode IDs appear, with the same counts, with the PR's three production files reverted tomain. So they come frommain, not from this PR. The PR doesn't touch sampler creation either.main, all threealiased_depth_*entries fail.git status --porcelainis emptyPrevious 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
a8c64b9c3bin the discussion yet.