mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-05 13:20:11 +00:00
A register written under EXEC is usually consumed by an LDS or buffer access or an export under the same EXEC. MaskedSelectEliminator kept the select in that case, which leaves the NGG mesh shaders where they were. The emitter performs buffer and LDS loads and stores (8 to 128 bits, GPU-selected V# included) and SetAttribute only in lanes whose active operand is true: stores and exports sit in an if on it, loads return 0 outside it. Every other operand is read only in those lanes. So such an access whose active operand implies the select's condition reads the derived value only where it equals the original, and it now ends the search like a masked select does. The active operand itself, atomics, append/consume, scratch and address-space accesses and image accesses still keep the select.