mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-04 13:07:32 +00:00
read_bda_span chooses between the span's in-place dword loads and its per-dword byte fallback, which calls read_bda_dword_bytes. Each shape of that choice so far hangs a group of NVIDIA drivers: a dispatch never finishes and the device is lost. As the two arms of one selection, with the loads emitted in the arm, it hung drivers 591.86 and 590.48.01 when lanes took both arms (#3291). As two selections, the loads under the span's condition and the fallback under its negation (#4759), it hangs 595.97, 596.36, 610.62, 610.74 and 610.57.04 (#4975). The loads now live in load_bda_span, a DontInline function that calls nothing, and read_bda_span is one selection again: one arm calls load_bda_span, the other is the fallback as before. Probe, loads, lookups, faults and stops are unchanged for every lane. On an RTX 4090 (Linux, driver 610.57.04) the two-selection shape hangs agc_driver_scalar_wide_loads and agc_driver_flat_apertures_0..13 in a build with SPIRV-Tools, and agc_driver_bda_span_reads and agc_driver_pixel_interlock in a build without. All pass with this change in both builds. Drivers 591.86, 590.48.01, 595.97, 596.36, 610.62 and 610.74 are not tested; a shape with the loads in their own DontInline function was reported passing on 591.86 in #3291. agc_shader_memory now requires that a span read function holds no load and calls its load function once, and that the load function holds the four loads and no call. Refs #4975