fix(shader): mask EXEC copies to the host subgroup's lanes #1264
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1264"
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 Celegans12 on 2026-10-07T20:22:10Z.
What
On a 32-lane host, wave64 graphics stages run one guest lane per invocation, but an EXEC written as a value still has bits for lanes 32-63. An
s_mov_b64copy of it keeps lanes no ballot clears, so a waterfall loop over the copy never ends.readRawU32reads EXEC as EXEC & ballot(true) (hostExecWord) fors_mov_b64 sN, exec, ALU sources and EXECZ, ands_*_saveexecands_*_wrexecstore that copy. EXEC's own words,threadBitand the saveexec combination stay raw, sos_orn2_saveexec_b64 vcc, execstill sets all 64 bits.agc_driver_scalar_sop1masks its EXEC_LO copies there. TechnicalDebt notes the console's EXEC holds the other lanes too.s_lshr_b64 exec, -1, 64 - countsets EXEC to -1. With our pending null-SRT work those draws run and hung the GPU at about 695 s. Under a 65,536-pass loop guard only these two shaders tripped it (102 times in 2,700 s).TranslationContext.hppwithout conflicting.Tested
mainc5e10184: configure-DBUILD_TESTING=ON, full build,--target libs,ctest:ctest --output-on-failure)VK_DRIVER_FILES): 395/395 pass;agc_driver_flat_storeis left out there because it takes several minutes on Windows llvmpipeagc_driver_exec_host_lanes: the title's loop (loads cut to ones_buffer_load_dword, capped at 128 passes) takes at most 6 passes in a 189-vertex wave64 draw (32+ lanes) and a 192-thread wave64 dispatch. It fails onmainwith 128: the draw on NVIDIA, the dispatch on llvmpipe.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-08T07:52:26Z.
Tested on Linux and an AMD host, both listed as not tested.
Nobara 44 (Linux 7.2), GCC 16.2.1, Release,
BUILD_TESTING=ON. This PR merged ontomaindf16c4c2, plus #1329 (without it the NVIDIA proprietary driver fails 100 GPU tests onmainfrom the dma-buf probe).-E agc_driver)guest_force_tls_destructor, which fails onmaintoo-R agc_driver -j1agc_driver_exec_host_lanesandagc_driver_scalar_sop1pass on both GPUs.Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-08T07:54:51Z.
Thanks for running this on the 7600X. A 64-lane pixel subgroup is the case I can't reach on my NVIDIA laptop, so it's good to see
agc_driver_exec_host_lanespass there. I'm looking at the RADV failure you found on #1268 next.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T10:08:51Z.
Checked: merged onto current
main, full build and ctest 434/434 green.agc_driver_exec_host_lanesfails with the source change reverted (waterfall never terminates) and passes with it. CI is green on this head (linux, windows, conventions), and fisherjoey's NVIDIA and RADV (64-lane pixel subgroup) runs also pass. No conflicts with #1217 or #1268. Merging.