summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJerome Glisse <glisse@freedesktop.org>2006-11-01 11:58:16 +0000
committerJerome Glisse <glisse@freedesktop.org>2006-11-01 11:58:16 +0000
commit3c6e99ce95bdee526f95ce8aaadd0c8923b83af0 (patch)
treee5ba826a40e2b7d2eceec9f99bbc9f18e4524d5a /src
parentfd60b2d5368e3385c1ba70c6d5d122b10ff20646 (diff)
Add CMPH instruction to fragprog
CMPH a0, a1, a2 -> if a2 > 0.5 return a1 else return a0 Guessed by examinating LIT instruction handling of FGLRX.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/r300_reg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h
index f3d8fa60f5..9f636ec1d2 100644
--- a/src/mesa/drivers/dri/r300/r300_reg.h
+++ b/src/mesa/drivers/dri/r300/r300_reg.h
@@ -1001,6 +1001,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
* - DP4: Use OUTC_DP4, OUTA_DP4
* - DP3: Use OUTC_DP3, OUTA_DP4, appropriate alpha operands
* - DPH: Use OUTC_DP4, OUTA_DP4, appropriate alpha operands
+ * - CMPH: If ARG2 > 0.5, return ARG0, else return ARG1
* - CMP: If ARG2 < 0, return ARG1, else return ARG0
* - FLR: use FRC+MAD
* - XPD: use MAD+MAD
@@ -1138,6 +1139,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R300_FPI0_OUTC_DP4 (2 << 23)
# define R300_FPI0_OUTC_MIN (4 << 23)
# define R300_FPI0_OUTC_MAX (5 << 23)
+# define R300_FPI0_OUTC_CMPH (7 << 23)
# define R300_FPI0_OUTC_CMP (8 << 23)
# define R300_FPI0_OUTC_FRC (9 << 23)
# define R300_FPI0_OUTC_REPL_ALPHA (10 << 23)