summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorOliver McFadden <[email protected]>2008-02-25 12:50:46 +0000
committerOliver McFadden <[email protected]>2008-03-01 06:33:06 +0000
commit41c3ae577894f1e577753a94cb87d6c93a8b1c63 (patch)
tree650585830084349e0e54bcb1262397fb5354cf2f /src/mesa/drivers/dri
parent0ced26099d3ff2e82ffd5fe7915504b13341c812 (diff)
r300: Converted to the new Math Engine defines.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/r300/r300_reg.h15
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.c16
2 files changed, 9 insertions, 22 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h
index 48b91cfd7b3..f852660dcc3 100644
--- a/src/mesa/drivers/dri/r300/r300_reg.h
+++ b/src/mesa/drivers/dri/r300/r300_reg.h
@@ -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)
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index 142e4b89e2f..13d233357aa 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -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));