test(agc): skip the csub and coherent atomic load runs on subgroups narrower than 32 lanes #19332
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/19332"
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-13T04:00:29Z.
What
Two execution tests merged today fail on lavapipe, whose subgroups are 8 lanes wide (
subgroupSize,minSubgroupSizeandmaxSubgroupSizeare all 8):agc_driver_global_atomic_csub(the runs withoutglcfrom #18667) fails withglobal atomic csub without glc: wave64 byte 644 is 146, expected 0. Lanes 33, 35, ..., 63 aren't written underEXEC_LO = 0x55555555, althoughEXEC_HIis still all ones.agc_driver_coherent_atomic_loads_enabled(#18600) times out after 60 s in its waiting dispatch.Both tests depend on gaps that
docs/dev/debt/shader.mdalready records for host subgroups narrower than 32 lanes:threadBitreads an EXEC written as a value at the bit for the host subgroup invocation id. So each lane at or above the host subgroup size reads a lower lane's EXEC_LO bit.v_readlane_b32can't read a lane outside the host subgroup.How each test hits them:
glcprogram setsEXEC_LOwiths_mov_b32.s_mov_b64 exec, 1, takes a ticket withbuffer_atomic_add ... glc, and shares it withv_readlane_b32 s4, v1, 0. With 8-lane subgroups, every subgroup takes its own ticket and reads its own lane 0, so the chain never completes.The recompiler didn't change. The failures come from the new assertions in #18667 and the new test in #18600. Both tests now return
VulkanTestSkippedwhenTarget().subgroupSizeis below 32, asagc_driver_relative_dppdoes for its partial-EXEC runs:skipped, subgroup size %u cannot hold a wave32.skipped, subgroup size %u cannot hold a wave64 in two lanes.They skip only after the checks that don't depend on lane layout:
glcruns and the accept and refuse checks.Why the threshold is 32 and the wave32 run without
glcalso skips:0x55555555repeats every two bits, so lanes 8–31 read the right bit by chance. Under the same gap, any other mask would fail.Pull requests don't run the self-hosted
linuxjob. That job has Mesa's Vulkan drivers installed and runs the teststools/select_tests.pyselects, and it runs only on pushes tomainand on manual dispatch. It now fails onmainwith both tests: run 43647851509 at995a10cdbbreportsagc_driver_global_atomic_csub (Failed)andagc_driver_coherent_atomic_loads_enabled (Timeout), plusagc_driver_stencil_copy_draw, which #20289 handles.Tested
Head
f5b8fdcdc4onmaine4caa07950, rebased after #21093 merged (no conflict;python3 tools/rebase_verify.py 35c6b6e7ff f5b8fdcdc4 --onto origin/mainreports that all added and deleted lines are kept). #21093 added a/dev/udmabufskip to both test files, and it comes before this PR's subgroup checks.The lavapipe table is from the rebased head. The Windows runs compared
maina6606d5babwith this commit on that base (d04031e5f7) and were not repeated after the rebase.All 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_(global_atomic_csub|coherent_atomic_loads|coherent_atomic_loads_enabled|buffer_atomic_csub)$' -V, 3 times per side and GPU. The lavapipe run at the rebased head left outagc_driver_buffer_atomic_csuband selected five more tests in the same command (the stencil copy and draw input tests of #20289 and #20831).VK_LAYER_KHRONOS_validation. The tests of this PR print noVUID-line. In the lavapipe logs at the rebased head, the only one isVUID-VkImageCreateInfo-samples-02258fromagc_driver_stencil_copy_draw, once per run onmainand on this branch alike.Ubuntu 24.04, GCC 13.3.0, Release, lavapipe (Mesa 25.2.8, LLVM 20.1.2, subgroup size 8), Khronos validation layer 1.4.335 built from source.
/dev/udmabufopens on this machine: every log hasdma-buf imports keep write protection: yesand noPermission deniedline, so #21093's skip does not apply. An earlier version of this section reported runs made without that access; see the correction in the comments.maine4caa07950f5b8fdcdc4agc_driver_global_atomic_csubwave64 byte 644 is 146, expected 0skipped, subgroup size 8 cannot hold a wave32agc_driver_coherent_atomic_loads_enabledskipped, subgroup size 8 cannot hold a wave64 in two lanesagc_driver_coherent_atomic_loadsagc_driver_buffer_atomic_csubpassed 3/3 on both sides at the previous head and was not rerun. Before the rebase, onmain, I printed every mismatching word of the csub run withoutglcwith a temporary local change. In wave64, lanes 33, 35, ..., 63 are not written; wave32 and lanes 0–32 match.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. Both report subgroup size 32, so these runs check that nothing changes there:mainOther checks:
ctest --test-dir build --output-on-failure -j6on lavapipe at d04031e5f7 (an earlier base, without/dev/udmabufaccess): 5193 of 5194 pass. I did not repeat the full run after the rebase. The one failure,output_fifo_macos, is not caused by this PR: the relinker sources here are the same as onmaina6606d5bab, and this PR doesn't touch the relinker. I didn't run it on amainbuild. It fails because its control andregularoutputs differ in the ad-hoc code signature's identifier, which since #18450 is the output file name.main's own CI since 2026-11-17: the self-hostedlinuxrunners can now open/dev/udmabuf(EagleBearerYS's comment below). I checked two of the jobs it cites, 133920014313 (main7ca28abfd5, LLVM 21.1.8) and 133926919815 (main3dceb9c2dd, LLVM 20.1.2). Both run llvmpipe withsubgroup=8, and in bothagc_driver_global_atomic_csubfails withwave64 byte 644 is 146, expected 0andagc_driver_coherent_atomic_loads_enabledtimes out at 60 s. These are the two failures this PR skips. This PR's ownlinuxCI job was skipped at its current head (2026-11-16), so CI hasn't run this PR's tests on the new runners.python3 tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.py --branchat the rebased head could not compare #14217, which conflicts withmain. Its change toCoherentAtomicLoads.cppmakesatomicalso true on the coherent-buffer-atomics target and rewords two messages, in the lines next to this PR's. The two changes are independent, and whichever merges second has a small textual conflict inmain().tools/check_skips.pyaccepts both skip messages as device limitations.Not tested:
agc_driver_coherent_atomic_loadsandagc_driver_global_atomic_csubran and passed 3 of 3 on each, with 0VUID-.f5b8fdcdc4merged ontomainf0c01bc69dagainst amainf0c01bc69dbuild. All four tests passed on both sides, the layer was inserted, and there were noVUID-lines. The new checks did not skip.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)🤖 Generated with Claude Code
Pull request closed