SPA 5.0:
SAM
{&req_6}
{?sched>=?WAIT2}
;
Set active thread mask. Used for TXD emulation and any other special application that requires fully-populated quads.
Pushes the current active mask onto the CRS stack, and then sets all individual threads in each quad to active. This allows the registers from all threads in a quad to be shared via SHFLand participate in subsequent texture operations.
The pushed active mask is restored via RAM. See the RAM description for details.
NOTE: SAM must be used with caution. No control flow instructions, except for BRA.U (See BUG 841150), are allowed between a SAM instruction and the subsequent RAM instruction. Due to the way this instruction manipulates the current active mask, great care must be taken not to corrupt registers in threads that happen to be disabled at the time of the SAM instruction, e.g. divergent threads that will resume execution after a subsequent sync-up, and thus have live values in their registers. SAM/RAM should only be used by system code. The code should be protected by IDE.DI and IDE.EN because any traps that occur between the SAM RAM section could corrupt the program state for the promoted threads.
SAM; NOP; RAM;