GPU/Shader Instruction Set: Difference between revisions
Smea plz (fixed according to aemstro) |
These are reference values, not negations... |
||
| Line 167: | Line 167: | ||
| 0x18 | | 0x18 | ||
| 0x1 | | 0x1 | ||
| Y | | Y reference bit (REFY) | ||
|- | |- | ||
| 0x19 | | 0x19 | ||
| 0x1 | | 0x1 | ||
| X | | X reference bit (REFX) | ||
|- | |- | ||
| 0x1A | | 0x1A | ||
| Line 646: | Line 646: | ||
A number of format 2 instructions are executed conditionally. These conditions are based on two boolean registers which can be set with CMP : cmp.x and cmp.y. | A number of format 2 instructions are executed conditionally. These conditions are based on two boolean registers which can be set with CMP : cmp.x and cmp.y. | ||
Conditional instructions include 3 parameters : CONDOP, | Conditional instructions include 3 parameters : CONDOP, REFX and REFY. REFX and REFY are reference values which are tested for equality against cmp.x and cmp.y, respectively. CONDOP describes how the final truth value is constructed from the results of the two tests. There are four conditional expression formats : | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
| Line 655: | Line 655: | ||
|- | |- | ||
| 0x0 | | 0x0 | ||
| <nowiki> | | <nowiki>cmp.x == REFX || cmp.y == REFY</nowiki> | ||
| OR | | OR | ||
|- | |- | ||
| 0x1 | | 0x1 | ||
| <nowiki> | | <nowiki>cmp.x == REFX && cmp.y == REFY</nowiki> | ||
| AND | | AND | ||
|- | |- | ||
| 0x2 | | 0x2 | ||
| | | cmp.y == REFY | ||
| Y | | Y | ||
|- | |- | ||
| 0x3 | | 0x3 | ||
| | | cmp.x == REFX | ||
| X | | X | ||
|} | |} | ||
== Registers == | == Registers == | ||