mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-03 12:57:27 +00:00
A load selected instead of branched still accesses memory, so its fallback element must be one no write can race with: scratch keeps element 0, LDS in workgroup or function memory reads a sentinel dword appended after the program's LDS and lock, and storage buffers read element 0xfffffffe, which robustBufferAccess2 turns into a zero load without a memory access. The device enables robustBufferAccess2 when it has it and the target carries the flag; without it, and for LDS in device memory, buffer loads keep their selections. The aligned high word of a buffer read re-reads the low word's element instead of word 0. agc_guarded_memory_loads traces the emitted loads in both device modes. Co-Authored-By: Claude Fable 5.1 <[email protected]>