mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-23 09:03:22 -05:00
On an RTX 3060 (Windows, driver 591.86) a dispatch never finishes when the lanes of read_bda_span split between its in-place dword loads and its per-dword byte fallback, which calls read_bda_dword_bytes: Windows resets the GPU and the device is lost. The two were the arms of one selection in the DontInline function. They are now two selections, the loads under the span's condition and the fallback under its negation, joined after both. Loads, lookups, faults and stops are unchanged for every lane; only the SPIR-V control-flow shape changes (SPIR-V specification 2.11, structured control flow). Every stage except mesh shaders is emitted as SPIR-V 1.3, and OpSelect chooses between composites with a scalar condition only from 1.4 on, so the join stays a selection. The same hang and fix were reported in #3291 on an RTX 4060 Laptop GPU (Windows, driver 591.86) and an RTX 5060 (Linux, driver 590.48.01). An RTX 4070 Laptop GPU on driver 616.92 does not hang with either shape. The driver-side cause is unknown, so the shape is recorded in docs/dev/debt/shader.md. On main the hang fails nine tests on the RTX 3060, in two ways. agc_driver_{flat,global}_loads{,_x2_x3,_x4} and agc_driver_flat_apertures_{2,5} abort after 64 to 71 s: the lost batch keeps its lease, so teardown waits 60 s for the pinned guest allocation. agc_driver_pixel_interlock fails after about 4 to 7 s with vkDeviceWaitIdle returning VK_ERROR_DEVICE_LOST (-4) and never reaches the pin wait. All nine pass with the change. Fixes #3291 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>