fix(shader): split a BDA span read's in-place loads from its fallback #3289
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3289"
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 fdfawef324 on 2026-10-11T05:33:32Z.
What
read_bda_span(the sharedDontInlineBDA dword read added in5623c0e9) had its in-place dword loads and its per-dword byte fallback as the two arms of one selection. On an NVIDIA RTX 3060 (Windows Server 2025, driver 32.0.15.9186), a dispatch whose lanes split between those arms never finishes. Windows resets the GPU after about 3 s and the recorder's fence wait returnsVK_ERROR_DEVICE_LOST.The two arms are now two selections, joined after both: the loads under the span's condition (
mapped && aligned), then the fallback under its negation. Every lane still takes exactly the path it took before. Loads, lookups, fault records,Volatileand invocation stops are unchanged, andDontInlinestays, so the compile-time win of 5693c77e/5623c0e9 is kept. The SPIR-V passesspirv-val --target-env vulkan1.2before and after.How it was narrowed down
All on the RTX 3060, with
agc_driver_flat_loads(result: hang or pass):mainAPS5_BDA_BYTE_READS=1(no span function)DontInlineThe hang needs lanes in the in-place loads and lanes in the fallback's nested calls (
read_bda_dword_bytes→get_bda_pointer) at the same time, inside the non-inlined function. It is not the 32-bit load, alignment, a wrapped address, the early returns of the stop variant, the probe call, or the OBS/Steam implicit layers. All of these were ruled out separately.The failure was hidden behind another error: the lost batch keeps its lease, so each test's teardown (
GuestBlock::~GuestBlock→Mutation().Remove) waited the 60 sAPS5_PIN_WAIT_MSfor the pinned allocation and aborted withstill pinned by GPU work or an import. Making a device loss surface as itself is a separate change.Tested
Windows Server 2025, WinLibs GCC 15.2.0 r7, Release, RTX 3060 (driver 32.0.15.9186), on
mainf5c0fe00:ctest: 765/765 pass, 5 skipped as before. Onmain10 fail on this machine, all from this hang:agc_driver_flat_loads,_x2_x3,_x4,agc_driver_global_loads,_x2_x3,_x4,agc_driver_flat_apertures_1,_2,_4, andagc_driver_pixel_interlock. The last now passes 5/5 repeats. Serial times of the aperture tests are 0.9–8.4 s.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T05:40:13Z.
Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
Pull request closed