GPU/Shader Instruction Set: Difference between revisions
| Line 119: | Line 119: | ||
| MIN | | MIN | ||
| Takes the max of two vectors, component by component; DST[i] = MIN(SRC1[i], SRC2[i]) for all i (modulo destination component masking) | | Takes the max of two vectors, component by component; DST[i] = MIN(SRC1[i], SRC2[i]) for all i (modulo destination component masking) | ||
|- | |||
| 0x0E | |||
| 1 | |||
| RCP | |||
| Computes the reciprocal of the vector, component by component; DST[i] = 1/SRC1[i] for all i (modulo destination component masking) | |||
|- | |||
| 0x0F | |||
| 1 | |||
| RSQ | |||
| Computes the reciprocal of the square root of the vector, component by component; DST[i] = 1/sqrt(SRC1[i]) for all i (modulo destination component masking) | |||
|- | |- | ||
| 0x13 | | 0x13 | ||
| Line 128: | Line 138: | ||
| 2 | | 2 | ||
| CALL | | CALL | ||
| Jumps to DST and executes NUM instructions | | Jumps to DST and executes instructions until it reaches DST+NUM instructions | ||
|- | |- | ||
| 0x26 | | 0x26 | ||
| | | 3 | ||
| CALLC | | CALLC | ||
| Jumps to DST and executes NUM instructions | | Jumps to DST and executes instructions until it reaches DST+NUM instructions if BOOL is true | ||
|- | |- | ||
| 0x27 | | 0x27 | ||
| 3 | |||
| IFU | |||
| If condition BOOL is true, then executes instructions until DST, then jumps to DST+NUM; else, jumps to DST. | |||
|- | |||
| 0x28 | |||
| 2 | | 2 | ||
| | | IF? | ||
| | | If condition (don't know how condition flags work yet) is true, then executes instructions until DST, then jumps to DST+NUM; else, jumps to DST. | ||
|- | |- | ||
| 0x21 | | 0x21 | ||
| Line 149: | Line 164: | ||
| END1 | | END1 | ||
| ? | | ? | ||
|- | |||
| 0x2E | |||
| 1 | |||
| CMP1 | |||
| Presumably compares two vectors component by component and sets the appropriate flags. (unknown exactly how this works as of yet) | |||
|- | |||
| 0x2F | |||
| 1 | |||
| CMP2 | |||
| Presumably compares two vectors component by component and sets the appropriate flags. (unknown exactly how this works as of yet) | |||
|} | |} | ||