From: Jerome Glisse Date: Wed, 1 Nov 2006 11:58:16 +0000 (+0000) Subject: Add CMPH instruction to fragprog X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3c6e99ce95bdee526f95ce8aaadd0c8923b83af0;p=mesa.git 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. --- diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h index f3d8fa60f5b..9f636ec1d2e 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)