fix(shader): ballot 32-lane host subgroups with a subgroup OR #6654
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6654"
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 mariuszkreft on 2026-10-16T01:59:04Z.
What
Tested
Linux, on the host, in the slice worktree. The loop ran this gate itself; the tail of it is
at the bottom of this pull request. No title and no GPU were involved.
Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryVerification log tail
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T02:38:37Z.
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.
main)docs/dev/debt/shader.mdL104core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppL35Some 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.
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/SpirvBackend/src/SpirvEmitter.cppcore/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvSubgroup.cppcore/shader/recompiler/SpirvBackend/src/SpirvEmitter.cppcore/libs/tests/Wave32WideSubgroup.cppcore/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvMemory/SpirvSubgroup.hppcore/shader/recompiler/SpirvBackend/src/SpirvEmitter.cppcore/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvSubgroup.cppdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppdocs/dev/debt/shader.mddocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppdocs/dev/debt/shader.mddocs/dev/debt/shader.mddocs/dev/debt/shader.mddocs/dev/debt/shader.mdcore/libs/tests/Wave32WideSubgroup.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/SpirvBackend/src/SpirvEmitter.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/SpirvBackend/src/SpirvEmitter.cppdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppdocs/dev/debt/shader.mdcore/shader/recompiler/SpirvBackend/src/SpirvEmitter.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppImported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-16T02:58:32Z.
Review: COMMENTED
Another NVIDIA driver branch, plus lavapipe: no regressions.
Machine: NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329 (32-lane subgroups with arithmetic, so the OR form is used), plus lavapipe (Mesa 26.0.3, LLVM 21.1.8, subgroup size 8, so it keeps
OpGroupNonUniformBallot) on the same machine. Ubuntu 26.04, i7-8700, GCC 15.2, Release,BUILD_TESTING=ON. Head1c0c66c98merged intomain5d9dcc42d(clean merge),-j1 --timeout 30.SpirvBackendsources restored frommain):wave32_wide_subgroupfails witha wave64 ballot half took the wrong form for the host subgroup, so the new check catches the old emission.wave32_wide_subgroup,agc_shader_memory,agc_subgroup_clock,agc_driver_wave32_exec_lane_bitsandagc_driver_wave32_subgrouppass 3/3 on both devices (wave32_subgroupskips on lavapipe, as onmain).ctest -R "^agc"(flip, display andlds_atomics64excluded): RTX 3070 591/593, the same asmainhere (stencil_ref_exportskipped,store_over_untrackedfailing, #6347). lavapipe: 593/593 with the same 40 skips asmain.I don't have the GTA V captures, so the crash itself isn't reproduced here. This only shows the OR form doesn't regress the AGC suite on the 595 branch.
GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3, LLVM 21.1.8), Ubuntu 26.04
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-16T03:12:11Z.
A data point for the "possibly related" #6294. On NVIDIA 595.99 this rewrite doesn't avoid the Borderlands 4 crash, so the two look like different triggers. That doesn't say anything about GTA V on 580.
compute-edb626b757e75707) by hand. That's all 154OpGroupNonUniformBallot, each turned intoOpGroupNonUniformBitwiseOr Reduceofpredicate ? 1 << SubgroupLocalInvocationId : 0in the first word, withGroupNonUniformArithmeticadded. It passesspirv-val, andagc_compute_pipeline_replaystill segfaults inlibnvidia-gpucomp3 of 3, like the original.main5d9dcc42ddidn't settle it either way. Its shader cache was cold, because the ballot shaders change. At 496 s it ended in the game's ownGameThread timed out waiting for RenderThread after 120.00 secs. Onmainit segfaulted at about 430 s, after a warm start.Linux (Ubuntu 24.04), RTX 4070 Ti, NVIDIA 595.99.02.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-17T14:43:16Z.
GPU execution data for this change: the first run on GPUs, as far as I can see. It covers a 32-wide host (Intel) and a 64-wide host (AMD).
Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built,
ANYPS5_NO_SHADER_CACHE=1, serial CTest,main47a266cf9. Intel UHD Graphics 770 (8086:a780, 32-wide subgroups), driver 32.0.101.7088. AMD Radeon RX 9070 XT (1002:7550, 64-wide subgroups), driver 32.0.31041.1004, withVkCacheemptied first.1c0c66c98merged intomain:wave32_wide_subgroupand the 10agc_shader_memorytests, ×3mainwithout the fix, ×3agc_shader_entry_lane_proof_budget,agc_shader_memoryandwave32_wide_subgroupfailmainmainmainalone: UHD 770 1392 of 1398, RX 9070 XT 1396 of 1398. The failures are image tables (#6647) andsample_multisample_target(#6971) on Intel, andquad_pixel_mask(#6255) andlayered_volume_vertex_no_gpl(#4768) on AMD.This PR conflicts with #6638 in
core/libs/tests/Wave32WideSubgroup.cppandSpirvEmitter.cpp.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by mariuszkreft on 2026-10-17T19:25:31Z.
Closed by the contribution loop's guard: this pull request has no checklist and was not opened by the loop's reviewed path. The work will be reopened as a pull request after the local gate and the review pass.
Imported from boykopovar/AnyPS5. Originally posted by CPritch on 2026-10-18T15:00:33Z.
Tested in game: GTA V PPSA04263 on Linux, RTX 4060, NVIDIA 580.126.20. main
385ed71f2crashes in libnvidia-gpucomp during the Story load; with this PR mergedit gets past the load and into gameplay. Details in #1203.
Pull request closed