test(agc): skip the two-sample stencil copy cases without 2x custom sample locations on the depth target #20289
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/20289"
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 peacocksir on 2026-11-14T23:47:33Z.
What
agc_driver_stencil_copy_draw, added by #16025, fails on lavapipe. Its four two-sample cases draw with custom sample locations on a 2xVK_FORMAT_D32_SFLOAT_S8_UINTdepth target:format sampleCounts: VK_SAMPLE_COUNT_1_BIT|VK_SAMPLE_COUNT_4_BIT), so creating the target logsVUID-VkImageCreateInfo-samples-02258.ValidateSampleLocations:custom sample locations require VK_EXT_sample_locations support for the draw's sample count.The driver behaves as intended here: it refuses a draw the device can't run. The test assumes every device can run it.
This PR changes only the test. It still runs the two one-sample cases on every device. Before the two-sample cases, it checks the device for what the driver requires for these draws:
framebufferDepthSampleCountshas 2x (Pipeline.cpp, "device does not support depth targets with the draw's sample count").sampledImageStencilSampleCountshas 2x (DepthSurface.cpp, "the device cannot sample the native depth target's stencil at its sample count").SampleLocationsCompatibleDepth(context, VK_FORMAT_D32_SFLOAT_S8_UINT, 2), the driver's own check for custom sample locations on that depth format.If any of them fails, the test shuts the driver down, prints
skipped, the device has no sampled 2x D32_SFLOAT_S8_UINT depth targets with custom sample locations, so only the one-sample stencil copies ranand returnsVulkanTestSkipped. This followsagc_driver_sample_order, which checks the same limits and helper (SampleOrder.cpp,GridReferenceandRecipeDepthLocations).VK_FORMAT_D32_SFLOAT_S8_UINTis the host format on every device: the test's depth registers select Z format 3 with stencil, andHostDepthFormatonly substitutesVK_FORMAT_D16_UNORM_S8_UINT.One driver check is not mirrored. Whether a 2x depth target is sampleable also depends on two
vkGetPhysicalDeviceImageFormatPropertiesqueries inDepthSurface.cppthat use the driver's internal sample-shadow usage. A device that passes the three checks above but fails those queries would still fail this test with the driver's own refusal message, not skip. I know of no such device.Pull requests don't run the self-hosted
linuxjob, which has Mesa's Vulkan drivers. It runs only on pushes tomainand on manual dispatch. Since #16025 merged, it fails onmainwith this test: run 43647851509 at995a10cdbbreports99% tests passed, 3 tests failed out of 5493, namelyagc_driver_stencil_copy_drawand the two narrow-subgroup tests that #19332 skips.Tested
Head
503e74637conmain89ecbc95f8.StencilCopyDraw.cpp,DepthSurface.cppandPipeline.cppare unchanged between3c310597b6and89ecbc95f8. The A/B runs below comparemain3c310597b6with this change applied on it.All A/B runs used the same environment on both sides:
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer.ctest --test-dir build -R '^agc_driver_stencil_copy_draw$' -V, 3 times per side and GPU.VK_LAYER_KHRONOS_validation.Ubuntu 24.04, GCC 13.3.0, Release, lavapipe (Mesa 25.2.8, LLVM 20.1.2), Khronos validation layer 1.4.335 built from source.
mainagc_driver_stencil_copy_drawVUID-VkImageCreateInfo-samples-02258, then the custom sample locations refusalVUID-I repeated the branch side at
503e74637cwith the same result: skips 3/3, 0VUID-.Windows 10 22H2 (19045), WinLibs GCC 15.2.0 r7 UCRT, Release, Vulkan SDK 1.4.363.1 validation layer, implicit layers disabled (
VK_LOADER_LAYERS_DISABLE=~implicit~). One PC with both GPUs, each selected withANYPS5_GPU. These runs check that the two-sample cases still run where the device supports them:mainVUID-VUID-"All six cases" means the log ends with
the DB stencil copy wrote both drawn stencil values exactly where its draw rasterized, which the test prints only after the last two-sample case.Other checks:
ctest --test-dir build --output-on-failure -j6 --timeout 300on lavapipe at503e74637c: 5491 of 5493 pass, andagc_driver_stencil_copy_drawskips. The two failures,agc_driver_global_atomic_csubandagc_driver_coherent_atomic_loads_enabled(timeout), are not caused by this PR. They come from lavapipe's 8-lane subgroups, and my open #19332 skips them.python3 tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.pyfinds no overlap with open pull requests.tools/check_skips.py's device-limitation pattern accepts the skip message.Not tested:
503e74637con RDNA2 (gfx1036) and RDNA3 (gfx1100), and the skip on llvmpipe.D32_SFLOAT_S8_UINTtarget (see the end of What).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)Pull request closed