feat(agc): sample the stencil plane of a native multisampled D32S8 target #9717
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9717"
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-22T09:44:56Z.
What
This is stacked on #9533 (
53886418d9).PPSA03208 reads the stencil plane of a native multisampled D32S8 target per sample, through a plain
R8_UINT2D MSAA descriptor, right after reading its depth the same way. On #9533 that read is the next stop, at the first dispatch of a compute program, inCheckResource:native multisample depth sampled identity or format mismatch(oneandonlydean's run).1546eb00 c0500000 021bc1df e1810924 00000000 00700010 00000000 00000000. Its base is the separate stencil plane, at format 5 (R8_UINT), 2 samples, 2D MSAA, tile mode 4 and no metadata.The change:
What
CheckResourceaccepts: a T# at the target'sstencilAddress, when all of these hold:R8_UINT);kZ64KBX), and one slice and level;Other stencil descriptors refuse with the existing texts.
The view:
Sampledmakes aVK_IMAGE_ASPECT_STENCIL_BITview of the host D32S8 image, with the T#'s component mapping. Where the device samples through the sample shadow, the view is of the shadow. The device'ssampledImageStencilSampleCountshas to cover the sample count.The binding: an
R8_UINTT# binds as an unsigned-integer sampled image, and a stencil-aspect view returns the stencil as an unsigned integer in R, so the view matches the shader's binding.The shadow: once a stencil read has used the sample shadow, each refresh copies depth and stencil in one
vkCmdCopyImage.Unproven planes: a stencil plane #9533 leaves unproven, because an aliasing colour target drew over it, still refuses with #9533's text.
Debt: a new entry, "Native multisample stencil plane sampling", lists the accepted descriptor, the shadow copy and the refusals. It also says console equivalence isn't measured.
Overlap: checked with
git merge-treeagainst every open PR touching these files, onmain7e2ba73e4c.Sampled's signature andCheckResourcecalls composes with this PR's hunks: this PR takes it in through #9533's merge ofmain(74594d4a81) without a conflict, andSampledcarries both sides' parameters.DepthSurfaceTextureand the surface class, away from this PR's functions. Neither merges withmainyet.1d16d5029d(920e43691f) needed only #9533's debt entry, where both sides' edits are kept, and9afaa90c1f(dea8f8ddbd) merged cleanly, anda45dff8d51(ec384dd23f), #9533's merge ofmainwith #6727, again needed only #9533's debt entry, where both sides' edits are kept. Merging1582cf6cc0(e5a24cd3c5), #9533's queued-fill skip, needed only that entry once more, and both sides' words are kept.CMakeLists.txt,NativeMultisampleDepth.cppand the debt file. Keeping both sides resolves them, as on the combined test branch below. Merge order: #9742 first, then this PR, as both PRs' Depends on lines say.git merge-treeof this head and #13021's24869a37eaconflicts in five files:DepthSurface.cpp(refreshSampleShadow's second parameter),MultisampleTarget.cpp,CMakeLists.txt,NativeMultisampleDepth.cppand the debt file. #13021 and #9533's head already conflict in two of them.mainand takes this PR'srefreshSampleShadowform (thestencilReadsignature, without its second stencil copy), as XatiX's resolution there describes.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_stencil_viewis 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.CMakeLists.txtand the AGC debt file are shared with many PRs, by neighbouring lines only.Tested
RTX 3070 Laptop GPU (NVIDIA 617.42, Windows 11,
VK_LOADER_DRIVERS_SELECT='*nv*'; clocks weren't held, so these are pass/fail only):agc_driver_native_depth_stencil_viewpass five times each.Linux, Mesa llvmpipe (which runs the 4-sample case):
R8_UINT2D MSAA T# at the stencil address, and checks every sample's depth bits, stencil value and component mapping.DepthSurface.cppat #9533's head, the test fails withnative multisample depth sampled identity or format mismatch.--parallel 4:agc_driver_pipelined_fill,agc_driver_sgpr_pattern_fill_keysandagc_driver_pipelined_indirect_draw. The same tests fail on #9533's head and pass when run alone.Validation layer, #9533 (
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, withVK_LOADER_DEBUG=layerto show the layer loading. The device was llvmpipe (LLVM 20.1.2) on Mesa 25.2.8, Ubuntu 24.04.5, Khronos validation layers 1.3.275.VK_LAYER_KHRONOS_validation16 times on #9533's tree and 54 with this PR. Neither log haswas not found but was requested by env var VK_INSTANCE_LAYERS.VUID-VkDeviceCreateInfo-pNext-pNext, for a device-creation structure newer than that layer version. This PR adds noVUID-message.Apple M2 Max with MoltenVK, by @jotitadev (review): macOS 27.2, x86_64 under Rosetta 2, Release. They used MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0) and MoltenVK main + SPIRV-Cross #2704, on #8658's macOS port (
1688e5abb8), sincemaindoesn't build on macOS; this head's diff applied with no conflicts.agc_driver_native_multisample_depthpass 3 of 3 on both drivers.agc_driver_native_depth_stencil_viewruns 2 and 4 samples; this device doesn't offer 8.agc_driver_native_depth_stencil_viewfails on both drivers withnative multisample depth sampled identity or format mismatch.^agcsuite with this PR (861 tests): the same failures as on the base on both drivers, exceptagc_driver_uint8x4_color_targetonce on main + #2704, which they say is intermittent on that machine without this PR too.Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, a pair that differs only by this PR's commit: Linux, RTX 4070 Ti, NVIDIA 615.71.09, release libraries.
219e925509, on #9533's514643ab16(comment): the warm run stops at 14 s, in compute shader 0x20001ef700, onnative multisample depth sampled identity or format mismatch. The cold run ended in a SIGSEGV at 16 s with no message before it, which didn't come back on the branch below.test/ghost-9742-9717(3ec696f7fe:219e925509and this PR's767374011f; comment), 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. Both stop ata color target's sample count differs from the rasterizer's, which milescoviello's #8115 handles.CheckResource's identity check, and the only clause this PR changes there accepts a T# at the target's stencil plane with format 5 (R8_UINT). So the shader that stopped there without this PR reads the D32S8 target's stencil plane that way, and gets past with it.920e43691f, #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_stencil_viewpass 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_stencil_viewis the one in the Red line 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.Validation,
mainb7d1d47a5fagainst920e43691f(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.Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, with #9742, #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.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.Ghost of Tsushima Director's Cut (PPSA02225), by @xXPBSXx (comment): Windows 10 Pro, WinLibs GCC 15.2.0, Release, NVIDIA GeForce RTX 4080 SUPER, runs of up to 600 s with no input, all libraries rebuilt for each tree (pass/stop only).
main1e20650e84, both runs stop in compute shader0x20001ef700onnative multisample stencil or depth format import is not implemented.1e20650e84, which brings #9533 along (so these runs don't separate the two), neither run has that refusal. The same shader stops on the next check,native multisample depth or HTILE aliases a multisampled colour target whose samples are only on the host: the depth-plane alias #9742 addresses. These runs didn't include #9742.dea8f8ddbd, #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_stencil_viewpass 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.ec384dd23f, #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_stencil_viewpass 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.check_conventions.py: no errors and no comment lines added. One existing warning,debt-length, on the native multisampled depth entry.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_stencil_viewpasses 5 of 5 (3 cases checked per run, none unavailable). #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).e5a24cd3c5, #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_stencil_viewpass 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.ff06dc329a, #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_stencil_viewfails 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.Not yet tested on PPSA03208. oneandonlydean has offered to run it.
24fe4ea82b, 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.74594d4a81, 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.74594d4a81on GitHub's runners, red/green against #9533's head55b0a5f4ad(run),^agc_driver_native_: on Linux, with #9533's implementation of the changed files,agc_driver_native_depth_stencil_viewfails withnative multisample depth sampled identity or format mismatch(1 of 14). With this PR, 14 run, 12 pass, 2 skip (agc_driver_native_depth_bda_clearandagc_driver_native_fmask, which skip on both trees), 0 fail, 10 runs in a row. On Windows all 14 build and skip, as the runner has no Vulkan device. 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.Validation layer,
main3fcb5e4d76against74594d4a81(CONTRIBUTING's AGC rule; run), on GitHub's Linux runner (llvmpipe, LLVM 20.1.2), withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andctest -V,^agc_driver_native_once:main's tree ran the 7 of these tests it has (5 pass, 2 skip) and this head all 14 (12 pass, 2 skip). The layer was inserted 12 times onmainand 24 with this PR, neither log haswas not found but was requested, and both report onlyVUID-VkDeviceCreateInfo-pNext-pNext, so this PR adds noVUID-message.AMD GPUs on RADV, per tablefrogpillow's report (comment): on a test branch with this PR and #9742 (e2eb3ff566), Mesa 25.2.8, the Khronos validation layer on,
agc_driver_depth_surface_from_storage,agc_driver_depth_surface_last_writerandagc_driver_native_multisample_depthpass on an RX Vega 56 (VEGA10, GCN5), an RX 7900 GRE (NAVI31, RDNA3) and a Ryzen 7 7800X3D's integrated GPU (RAPHAEL, RDNA2): 3 run, 3 pass, 0 skip, 0 fail on each, withagc_driver_native_multisample_depthchecking all 24 of its cases.f63435d33a, a merge of #9533's head078e6a68d8(run). It takes #9533's two merges ofmainsince this PR last took it: #10375'sCheckDepthAttachmentAliasand #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.Assassin's Creed Shadows (PPSA20397), by akkadbakkad89, RTX 3070, Windows 11, driver 617.42, ran this PR on its stack (#9533, which carries #6300), per their report (comment): the title gets past #9533's format refusal at about +848 s and into pixel shading it hadn't reached before. Its next stop, a stencil-reference-export pixel shader (detail on #4276), is outside this PR, and the report doesn't single out this PR's stencil reads.
VK_LAYER_KHRONOS_validation(SDK 1.4.363.0),ANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1, akkadbakkad89 reports noVUID-delta.e9c5d95d33, a merge of #9533'sf39599c354, which mergesmain19af7f44e4(run). No conflict here: #9533's merge carries #10368'sCheckStorageAliasRetirementbeside theClearFaultandClearSourceenums, and this PR's changed lines are the same. Theagc_driver_native_,agc_driver_depth_,agc_driver_msaa_andagc_driver_sampletests, with the other tests built from the files the merge changes, pass 10 runs in a row. Linux: 303 run, 287 pass, 16 skip, 0 fail. Windows: 322 run, 184 pass, 138 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.9846498dc7, a merge of #9533'sa7697941f3, which mergesmainccfb96757f(run). No conflict here, and this PR's changed lines over #9533 are the same. The native depth, stencil-view, depth-surface anduint8x4colour target tests ran 10 times with no failure. Linux: 10 run, 7 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: 10 run, 0 pass, 10 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.41e4c2e241, 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).DepthSurface.cppandNativeMultisampleDepth.cpp.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.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners. On Linux, libc and libkernel ran 166 and 264 tests with 0 failed. On Windows libc ran 194 with 0 failed, and libkernel failed one of 286: The test had logged a chain of nested guest signal frames ([exception] guest context signal=0x1e, each further down the stack) before the process stopped.guest_raise_in_host_codeis a libkernel signal test that the merge doesn't touch.guest_raise_in_host_coderan 20 times in a row on Windows with no failure: 1 run, 1 pass, 0 skip, 0 fail. In the same run, libc and libkernel ran 194 and 286 tests with 0 failed. The test is registered on Windows only.defd410761, a merge of #9533's6eb141ce5f, which mergesmain102b7a5cf0and with it Jamie's #12566 (×10 run, ×20 run). It merged cleanly, and this PR's own diff is unchanged. 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.guest_raise_in_host_code, which is registered on Windows only, ran 20 times there with no failure. 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.Validation comparison at
defd410761(CONTRIBUTING's AGC rule):main102b7a5cf0, this head's base. Since thenmainhas changed onlylibSceAgcDriver/CMakeLists.txtand the debt file among this PR's paths. On GitHub's Linux runner (llvmpipe (LLVM 20.1.2), Mesa 25.2.8, Ubuntu 24.04.5), withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andctest -V:^agc_driver_native_. This head: 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 this head, and neither log haswas not found. Both logs report onlyVUID-VkDeviceCreateInfo-pNext-pNext, and the change adds none.agc_driver_sample_multisample_target, the drawn 4x target's sample-0 guest reads included: passes on both arms with no new VUIDs (run). ×10 on this head (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.Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, with this PR's
DepthSurface.cppchange (comment):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, plus defd410761'sDepthSurface.cppchange (his local 6be6c22f23, with this PR's test-registration and debt-entry conflicts against #9742 taken from the combination's side). Without it, the run stops 33 s in onnative multisample depth sampled identity or format mismatchin compute shader 0x20001ef700 (comment). With it, that stop is gone, and the run stops 21 s in on the same shader atvkAllocateMemory 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. That allocation isn't in this PR's path.8fe640ecdb, 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.a90d0b73bb, 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. This branch carries #9533 but not #9742, so it takes #9533's merge directly.CMakeLists.txt, whereagc_driver_native_depth_buffer_clearjoins this PR'sset_tests_propertieslists, which also carryagc_driver_native_depth_stencil_view. 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_stencil_viewandagc_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.Divinity: Original Sin II Definitive Edition (PPSA06866, 01.007.000), by @XatiX, at this head (comment, bring-up #13726).
main73f4f7e06e+ this PR + #13021 + #13734 + XatiX's local commits ontest/dos2-retest.R8_UINT2D MSAA descriptor with no metadata, in a draw withDB_RENDER_CONTROL0x88.native multisample depth sampled identity or format mismatch.e1b9e7ee9e, which extendsDecodeDepthCopyPassto bit 3 ofDB_RENDER_CONTROLwith a driver pixel program.a63bd1432f, a merge of #9533's merge ofmain0836dfdf4f(run, on 6f9dd9f266, 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.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)tests/execution/NativeMultisampleDepth.cppand lines to the AGCCMakeLists.txtand the debt file; this PR goes after it and keeps both when it mergesmain); #10882 (orezraey) goes after this PR (merge order only, on #10882); #13021 (JAB-dev) goes after this PR (merge order only, agreed on #13021)native multisample depth sampled identity or format mismatch, with #9742 (see Tested). With #9742, #8115 and #8121 as well, Ghost of Tsushima Director's Cut reaches its brightness calibration screen and intro, with no refusal or crash through the 600 s limit, warm and cold (milescoviello's run above). Later runs on that host ended at the 20 GiB memory cap (see Tested).Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T09:47:55Z.
@oneandonlydean this draft is the stencil-plane follow-up from your PPSA03208 run on #9533 (comment), stacked on #9533's
514643ab16. It takes your third read:CheckResourcenow accepts anR8_UINT2D MSAA T# with no metadata at the target's separate stencil plane, at the surface's extent, sample count, tile mode and XOR, andSampledbinds it through a stencil-aspect view of the native image, or of its sample shadow, which then copies stencil too. If you can run it on PPSA03208 as you offered, the log would show whether that compute program gets pastCheckResource, and the next stop if there is one. A plane that #9533 leaves unproven, because a colour target drew over it, still refuses with #9533's text.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T12:03:07Z.
The stencil-view diff is scoped to the R8_UINT descriptor path at the declared stencil plane, with a corresponding multi-sample test and an explicit refusal for color-drawn/unproven aliases. The reported RTX 3070 and llvmpipe red/green and validation-layer runs are useful; I have not independently rerun them. Before marking this ready, please rebase/update the 123-commit-behind stack to current main and rerun the focused native-depth suite plus the same main-vs-change validation-layer comparison on that merged base. The checklist currently says “Unblocks ... once a run confirms it” and the body says the title has not yet been tested; please update #4461 with the result and only describe PPSA03208 as unblocked if the title run confirms the next stop. Existing dependency #9533 and the overlap with #8999 should remain coordinated as the stack is updated.
Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-22T12:12:34Z.
Review: COMMENTED
Apple GPU / MoltenVK run, as a third device next to the RTX 3070 Laptop and llvmpipe. The stencil-aspect view of the multisampled D32S8 image works on MoltenVK at 2 and 4 samples, and the new test fails without the
DepthSurface.cppchange.Machine: Apple M2 Max, macOS 27.2, x86_64 under Rosetta 2. Release,
BUILD_TESTING=ON.Drivers: MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), and MoltenVK main + SPIRV-Cross #2704.
Base/method: PR #8658
feat/macos-port@1688e5abb8(currentmainplus the macOS port), notmain, which does not build on macOS. This head's diff from its merge basea6dcea9279(so #9533 included, withoutdocs/) applies to it with no conflicts. Full rebuild before each run.agc_driver_native_multisample_depthpass 3 of 3 on both drivers.agc_driver_native_depth_stencil_viewprintscases checked=2 unavailable=1: 2 and 4 samples run, 8 is not offered by this device.agc_driver_native_depth_stencil_viewfails on both drivers withnative multisample depth sampled identity or format mismatch. The other nine pass.^agcsuite with the PR:-j1 --timeout 30, 861 tests, no timeouts. Same failures as the base on both drivers (18 with MoltenVK 1.4.2, 17 with main + #2704), exceptagc_driver_uint8x4_color_targetonce on main + #2704. That test is intermittent on this machine without the PR too, and it passed on 1.4.2.GPUs tested: Apple M2 Max (MoltenVK 1.4.2; MoltenVK main + SPIRV-Cross #2704)
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T15:30:45Z.
Review: CHANGES_REQUESTED
The stencil-view change has a detailed descriptor-boundary test and substantial author-reported NVIDIA and lavapipe coverage, including validation-layer comparisons. I did not run the Vulkan suite locally; the hosted product build jobs are skipped on this head.
Please refresh the stack before merge. This PR is based on #9533 at
514643ab16, but #9533 has since advanced to1d16d5029d45ba362618fd6c95b21f1ae8e2305dand now contains 180 commits beyond that base, including later current-main merges and native-depth follow-up changes. Rebase the stencil change onto the latest #9533 head and rerun the focused native-depth tests/validation on that resulting stack; the existing tests are against the older prerequisite head. The current PR is alsoDIRTYagainst main.Please also coordinate the new CTest registration with #6044 and declare the agreed order in
Depends on. This commit addsagc_driver_native_depth_stencil_viewwith plainadd_testin the same AGC CMake file where #6044 converts registrations toadd_library_test(graphics ...). If #6044 lands first, use that helper; if this PR lands first, coordinate with its author so the test gets the label conversion when they rebase. The current overlap note calls this neighboring-line-only, but the registration policy affects this newly added test.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T22:45:40Z.
Review: CHANGES_REQUESTED
Re-checked — new head, changes requested
The stack refresh and #6044 registration concern are resolved, but a sampled-read failure in the inherited native-multisample path is not shown passing on this head.
What I ran
Reviewed exact head
defd4107611653abe91988a8a6aa9cf1eca33a16, PR base102b7a5cf0ed98dd94d9da76862eb1ee7865a932, and currentmainfdd1753204a4732e1011539cc9d3bb69f70b27a6. The merge preview against currentmainis clean. On Linux, without building, I ran:I inspected the current guard and its sampled-read test, the latest PR test summary, and the NVIDIA failure report on the root PR. I did not build or run GPU tests locally.
Results
docs/dev/debt/libSceAgcDriver.md.4854297d7b21974d7dc83162b6b1283334d86697.13aba93saysagc_driver_sample_multisample_targetfailed on that change and passed on itsbb04a4fmain control. This is not a run of the current child head.Raw output from local checks
Negative control
Findings
Blocking
CheckFirstSampleReadscase reads the drawn target's guest range. The root PR's controlled NVIDIA run reports that exact test failing on the change and passing on main. The current headdefd410merges the updated #9533 stack, but its listed repeated native-depth tests do not report this sampled-read case. Please resolve the root-path regression or show the test passing on the exact current integrated head before this stack is approved. I am not asking for a standalone rebase while #9533 remains open.Non-blocking
Sources
13aba93Not verified
I did not compile or run the GPU tests locally. The NVIDIA result is author/CI-provided and covers root head
13aba93, not this child head. Current product Linux and specialized CI jobs are skipped.To get this to a good state
After the parent stack resolves the sampled-read regression, rerun
agc_driver_sample_multisample_targeton current main and the exact integrated child head with the validation layer, and report whether there are newVUID-messages. I will recheck that exact head and rerun the non-building checks above.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T00:31:48Z.
Review: APPROVED
Re-checked — evidence updated, looks good
The author supplied successful sampled-read and validation-layer results for the exact stacked head that resolve the blocker in my previous review.
What I ran
Reviewed exact PR head
defd4107611653abe91988a8a6aa9cf1eca33a16against currentmainat673fa865f418876429bd871fdda2ab15ac1a0831; the merge preview was clean (treed125aaff9184326802de3be9f74006c095aa4e19). Environment: Linux 6.1.0-54-amd64, x86-64, Python 3.11.2; no compiler was used.Results
git diff --checkdebt-lengthwarning on the existing long AGC debt entryagc_driver_sample_multisample_targetpassed 10/10 on Linux; the Windows runner skipped for lack of a Vulkan deviceVUID-was emittedI verified the linked run commits are direct children of this PR head and that they add only the verification harness files. The 10-run check and validation-layer comparison completed successfully; these are author-provided CI results, not tests I ran locally.
Unedited local check output
Sources
Not verified
I did not build or run GPU tests locally, and no PS5-console behavior was tested. The comparison used base
102b7a5cf0ed98dd94d9da76862eb1ee7865a932; currentmainis673fa865f418876429bd871fdda2ab15ac1a0831. The intervening touched-path changes are limited to AGC test registration/gating and the debt document; the current-base merge preview is clean. Runtime and validation results above are author-provided CI evidence.