r300: Converted to the new Math Engine defines.
authorOliver McFadden <z3ro.geek@gmail.com>
Mon, 25 Feb 2008 12:50:46 +0000 (12:50 +0000)
committerOliver McFadden <z3ro.geek@gmail.com>
Sat, 1 Mar 2008 06:33:06 +0000 (06:33 +0000)
src/mesa/drivers/dri/r300/r300_reg.h
src/mesa/drivers/dri/r300/r300_vertprog.c

index 48b91cfd7b38a7fb7ca97aef7a439d48a1f39e78..f852660dcc3ce309e6b386c6c2a118c62d7938af 100644 (file)
@@ -2499,21 +2499,8 @@ enum {
 
 /*\{*/
 
-#define R300_VPI_OUT_OP_EXP                     (65 << 0)
-#define R300_VPI_OUT_OP_LOG                     (66 << 0)
-       /* Used in fog computations, scalar(scalar) */
-#define R300_VPI_OUT_OP_UNK67                   (67 << 0)
-#define R300_VPI_OUT_OP_LIT                     (68 << 0)
-#define R300_VPI_OUT_OP_POW                     (69 << 0)
-#define R300_VPI_OUT_OP_RCP                     (70 << 0)
-#define R300_VPI_OUT_OP_RSQ                     (72 << 0)
-       /* Used in GL_POINT_DISTANCE_ATTENUATION_ARB, scalar(scalar) */
-#define R300_VPI_OUT_OP_UNK73                   (73 << 0)
-#define R300_VPI_OUT_OP_EX2                     (75 << 0)
-#define R300_VPI_OUT_OP_LG2                     (76 << 0)
+/* FIXME */
 #define R300_VPI_OUT_OP_MAD_2                   (128 << 0)
-       /* all temps, vector(scalar, vector, vector) */
-#define R300_VPI_OUT_OP_UNK129                  (129 << 0)
 
 #define R300_VPI_OUT_REG_CLASS_TEMPORARY        (0 << 8)
 #define R300_VPI_OUT_REG_CLASS_ADDR             (1 << 8)
index 142e4b89e2fd2e3c60227accb87a3a924b2da013..13d233357aa21aba2a37522b51020d9f8b03bd45 100644 (file)
@@ -543,7 +543,7 @@ static GLuint *t_opcode_ex2(struct r300_vertex_program *vp,
                            struct prog_src_register src[3])
 {
        inst[0] =
-           PVS_VECTOR_OPCODE(R300_VPI_OUT_OP_EX2, t_dst_index(vp, &vpi->DstReg),
+           PVS_MATH_OPCODE(ME_EXP_BASE2_FULL_DX, t_dst_index(vp, &vpi->DstReg),
                        t_dst_mask(vpi->DstReg.WriteMask),
                        t_dst_class(vpi->DstReg.File));
 
@@ -559,7 +559,7 @@ static GLuint *t_opcode_exp(struct r300_vertex_program *vp,
                            struct prog_src_register src[3])
 {
        inst[0] =
-           PVS_VECTOR_OPCODE(R300_VPI_OUT_OP_EXP, t_dst_index(vp, &vpi->DstReg),
+           PVS_MATH_OPCODE(ME_EXP_BASE2_DX, t_dst_index(vp, &vpi->DstReg),
                        t_dst_mask(vpi->DstReg.WriteMask),
                        t_dst_class(vpi->DstReg.File));
 
@@ -631,7 +631,7 @@ static GLuint *t_opcode_lg2(struct r300_vertex_program *vp,
        // LG2 RESULT 1.X Y Z W PARAM 0{} {X X X X}
 
        inst[0] =
-           PVS_VECTOR_OPCODE(R300_VPI_OUT_OP_LG2, t_dst_index(vp, &vpi->DstReg),
+           PVS_MATH_OPCODE(ME_LOG_BASE2_FULL_DX, t_dst_index(vp, &vpi->DstReg),
                        t_dst_mask(vpi->DstReg.WriteMask),
                        t_dst_class(vpi->DstReg.File));
 
@@ -658,7 +658,7 @@ static GLuint *t_opcode_lit(struct r300_vertex_program *vp,
        //LIT TMP 1.Y Z TMP 1{} {X W Z Y} TMP 1{} {Y W Z X} TMP 1{} {Y X Z W}
 
        inst[0] =
-           PVS_VECTOR_OPCODE(R300_VPI_OUT_OP_LIT, t_dst_index(vp, &vpi->DstReg),
+           PVS_MATH_OPCODE(ME_LIGHT_COEFF_DX, t_dst_index(vp, &vpi->DstReg),
                        t_dst_mask(vpi->DstReg.WriteMask),
                        t_dst_class(vpi->DstReg.File));
        /* NOTE: Users swizzling might not work. */
@@ -695,7 +695,7 @@ static GLuint *t_opcode_log(struct r300_vertex_program *vp,
                            struct prog_src_register src[3])
 {
        inst[0] =
-           PVS_VECTOR_OPCODE(R300_VPI_OUT_OP_LOG, t_dst_index(vp, &vpi->DstReg),
+           PVS_MATH_OPCODE(ME_LOG_BASE2_DX, t_dst_index(vp, &vpi->DstReg),
                        t_dst_mask(vpi->DstReg.WriteMask),
                        t_dst_class(vpi->DstReg.File));
 
@@ -823,7 +823,7 @@ static GLuint *t_opcode_pow(struct r300_vertex_program *vp,
                            struct prog_src_register src[3])
 {
        inst[0] =
-           PVS_VECTOR_OPCODE(R300_VPI_OUT_OP_POW, t_dst_index(vp, &vpi->DstReg),
+           PVS_MATH_OPCODE(ME_POWER_FUNC_FF, t_dst_index(vp, &vpi->DstReg),
                        t_dst_mask(vpi->DstReg.WriteMask),
                        t_dst_class(vpi->DstReg.File));
        inst[1] = t_src_scalar(vp, &src[0]);
@@ -838,7 +838,7 @@ static GLuint *t_opcode_rcp(struct r300_vertex_program *vp,
                            struct prog_src_register src[3])
 {
        inst[0] =
-           PVS_VECTOR_OPCODE(R300_VPI_OUT_OP_RCP, t_dst_index(vp, &vpi->DstReg),
+           PVS_MATH_OPCODE(ME_RECIP_DX, t_dst_index(vp, &vpi->DstReg),
                        t_dst_mask(vpi->DstReg.WriteMask),
                        t_dst_class(vpi->DstReg.File));
 
@@ -854,7 +854,7 @@ static GLuint *t_opcode_rsq(struct r300_vertex_program *vp,
                            struct prog_src_register src[3])
 {
        inst[0] =
-           PVS_VECTOR_OPCODE(R300_VPI_OUT_OP_RSQ, t_dst_index(vp, &vpi->DstReg),
+           PVS_MATH_OPCODE(ME_RECIP_SQRT_DX, t_dst_index(vp, &vpi->DstReg),
                        t_dst_mask(vpi->DstReg.WriteMask),
                        t_dst_class(vpi->DstReg.File));