GPU/Shader Instruction Set: Difference between revisions
Steveice10 (talk | contribs)  | 
				Steveice10 (talk | contribs)  More thorough behavior testing  | 
				||
| Line 664: | Line 664: | ||
a0.x and a0.y are set manually through the MOVA instruction by rounding a float value to integer precision. Hence, they may take negative values. The way out-of-bounds values behave when reading uniforms is as follows:  | a0.x and a0.y are set manually through the MOVA instruction by rounding a float value to integer precision. Hence, they may take negative values. The way out-of-bounds values behave when reading uniforms is as follows:  | ||
* If the   | * If the offset is out of byte bounds (less than -128 or greater than 127), the offset is not applied (treated as 0).  | ||
* If the   | * The offset is added to the constant register index and masked by 0x7F.  | ||
* Otherwise, the   | * If the resulting index is greater than 95, the result is (1, 1, 1, 1).  | ||
* Otherwise, the result is the value at the indexed constant register.  | |||
aL can only be set indirectly by the LOOP instruction. It is still accessible and valid after exiting a LOOP block, though.  | aL can only be set indirectly by the LOOP instruction. It is still accessible and valid after exiting a LOOP block, though.  | ||