Repository navigation
fix(agc): skip the pixel interlock test where BDA atomics are not atomic - #8014
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Windows NVIDIA and AMD check, and two points about the skip. Windows 11 Home 26300, WinLibs GCC 15.2.0, Release, GPUs: RTX 5070 Ti (NVIDIA 617.42) and the AMD Radeon iGPU (RDNA2,
Points from the description itself:
AI-assisted: yes (Claude Code); results above were run on this machine. |
4fcacc9 to
6da6637
Compare
Rebase done, both points addressed, re-verifiedRebased onto current The skip and the failure it hides. You are right that they are different failures and that the macOS before/after shows only the second one turning into a skip. The functional entry now says it instead of leaving it implicit: on MoltenVK The driver not refusing. Now listed under "Silent stubs", with why Re-verified on the rebased head
Thanks for the NVIDIA and AMD check; it is the only Windows evidence in the thread. |
6da6637 to
9e1e23d
Compare
|
|
9e1e23d to
6a434f6
Compare
|
Adding the half that was still missing from your first point, on top of the response above rather than in place of it. The skip now names the failure the run reaches, and the check that decides it is separate from the atomics:
The technical-debt entry keeps the account you and I converged on — the skip covers the argument-buffer failure and neither is fixed here — and records which check fires first, so the reason in the output and the reason in the entry agree. Re-verified on the rebased head:
The driver still does not refuse, and the global atomics entry stays under Silent stubs as you asked. The refusal remains the separate change I offered above, and it is unaffected by this one. |
6a434f6 to
cdabc0f
Compare
|
Rebased onto While re-checking the branch I found a defect from the previous rebase: The branch is rebased onto Re-verified on the rebased head Windows 11, WinLibs GCC 15.2.0, RTX 3050,
The rebase changes only that debt file, so the code is unchanged from the previous head and the Linux/lavapipe and macOS validation evidence above still applies. I could not repeat the validation-layer runs here: this Windows machine has
|
cdabc0f to
600a312
Compare
|
Re-checked head
AI-assisted: yes (Claude Code); results above were run on this machine. |
The skip covers two MoltenVK failures that the same test hits: the driver runs a flat atomic through a buffer device address as a load and a store, so overlapping updates to one address are lost, and the interlock pipeline does not compile because SPIRV-Cross refuses raster_order_group in an argument buffer. The technical-debt file records the first under Silent stubs and the second in its functional entry, and agc_bda_atomics pins the predicate.
The skip named a failure the run never reached: on MoltenVK the test fails while the pipeline is created, because SPIRV-Cross puts a raster order group on the storage buffer the fragment shader updates and MoltenVK passes the descriptor set as an argument buffer, where Metal rejects the attribute. The run never reaches the counter, so it shows no lost update. The test now checks the raster order group first, with the reason the run fails, and the atomics on buffer device addresses second. The global atomics gap moves under the silent stubs, where it belongs: the driver neither refuses the atomic nor reports it to the title.
600a312 to
d00d8ba
Compare
✅ AMD GPU test: passedPR head
Unstable on main (4, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (9, not counted against this PR)Validated but not compared (1, not in the main baseline's validation pass)Validation IDs already present on main (5 IDs in 484 tests)Skipped (55)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
✅ NVIDIA GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (4, not counted against this PR)Validated but not compared (1, not in the main baseline's validation pass)Validation IDs already present on main (5 IDs in 484 tests)Skipped (46)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
What
A global (flat) atomic reaches its target through a Vulkan buffer device address (
OpConvertUToPtrover aPhysicalStorageBufferpointer), so the read-modify-write is atomic only where the driver guarantees atomics on such an address. MoltenVK does not: Metal has no atomic on a device pointer, so the update becomes a load and a store and concurrent updates to one address are lost.agc_driver_pixel_interlockis the only test that counts overlapping updates to one address, and it cannot run on MoltenVK: the fragment shader updates a storage buffer atomically, so SPIRV-Cross puts a raster order group on that buffer, and MoltenVK passes the descriptor set as an argument buffer, where Metal rejects the attribute. The test checks that first (RasterOrderGroupUsable) and skips with the reason the run actually fails, then checks the atomics (BdaAtomicsUsable) for a device that compiles the pipeline but cannot order the update. Both limitations are recorded in the technical-debt file.No other test covers the contended case:
agc_driver_global_atomicsgives every lane its own address (op * OpStride + tid * 8u), so it checks the value of an uncontended read-modify-write and cannot tell an atomic from a load and a store. A title that counts or locks through a flat atomic on macOS therefore sees lost updates; no title has been measured to quantify it.The argument-buffer compile error that also fails this test on MoltenVK is not fixed here: the
raster_order_groupis added by MoltenVK's own SPIRV-Cross, and resolving the atomic to a descriptor-bound buffer instead of a device address would change the BDA table ABI (BdaAbi::Rangecarries a flat device address).Tested
Linux (Ubuntu 24.04.5, x86-64, GCC 13.3.0, CMake 3.28.3, Ninja 1.11.1), device: lavapipe (Mesa 25.2.8, LLVM 20.1.2, Vulkan 1.4.318), with
ANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1:main, before the change:agc_driver_pixel_interlockpasses — the counter counts all 64 overlapping read-modify-writes and the killed BDA fault is reported (pixel interlock tests passed: 10 draws of 64 overlapping triangles over 2048 pixels, 2 of them with a killed BDA fault in every 8th column).VK_DRIVER_ID_MESA_LLVMPIPE.agc_bda_atomicsandagc_raster_order_grouppass.VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationon both: the same singleVUID-VkDeviceCreateInfo-pNext-pNext(the validation layer of Vulkan 1.3.275 does not know a structure type the driver passes) before and after, so the change adds no validation error.macOS (Apple M4, macOS 27.0.1 (26A434), x86-64 under Rosetta 2, Apple clang 21.0.0, CMake 4.4.4, Ninja 1.13.2), device: MoltenVK 1.4.2 from the LunarG Vulkan SDK 1.4.363.0, with
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(the loader inserted the layer in both runs; neither log containswas not found but was requested by env var VK_INSTANCE_LAYERS):mugurc/ci/macos-series-2ata0a9e8398plus theJit.cppandGuestMemoryLifetimeSupport.hppparts of feat: macOS on Apple Silicon host support (Rosetta 2 and MoltenVK) #7332, because the series does not build on macOS without them (MFD_CLOEXECis Linux-only inlibkernel/DirectMemory/Jit.cpp).agc_driver_pixel_interlockfails withAGC graphics: vkCreateGraphicsPipelines: Vulkan result -3, after MoltenVK reportstype 'const constant spvDescriptorSetBuffer0 &' is not valid for attribute 'buffer'withfield with illegal attribute 'raster_order_group' declared here. The run never reaches the counter, so it shows no lost update.skipped, the device does not support the raster order group the pixel interlock needs.VUID-errors in both logs, so the change adds no validation error.python3 tools/check_skips.py <junit> --job linuxaccepts the skip as a device limitation.Windows (Windows 11 Home 26300, WinLibs GCC 15.2.0, Release,
BUILD_TESTING=ON, RTX 5070 Ti NVIDIA 617.42 and the AMD Radeon iGPU RDNA2 with the AMD proprietary driver 2026.04.17,ANYPS5_REQUIRE_VULKAN=1, by @wachi35676):agc_bda_atomics,agc_raster_order_group,agc_driver_pixel_interlockand the fouragc_driver_global_atomics*tests pass on both GPUs, andagc_driver_pixel_interlockruns rather than skips.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)