summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver McFadden <z3ro.geek@gmail.com>2008-02-28 09:53:29 +0000
committerOliver McFadden <z3ro.geek@gmail.com>2008-03-01 06:33:06 +0000
commitf80223d9ffac6c2c3a94ab7f896dad6a04da5c8b (patch)
tree77f065f18831b35129d0c4b2f8e7740a9bcb0fa4
parentb795e8db5f994f5bb6eabfe72ddc3f52e5bbc9f9 (diff)
r300: Cleaned up the XPD opcode temporary register usage.
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index 05176e14ce..563b02b7a5 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -903,7 +903,6 @@ static GLuint *t_opcode_xpd(struct r300_vertex_program *vp,
VSF_FLAG_NONE) | (src[1].RelAddr << 4);
inst[3] = ZERO_SRC_1;
inst += 4;
- (*u_temp_i)--;
inst[0] =
PVS_VECTOR_OPCODE(VE_MULTIPLY_ADD, t_dst_index(vp, &vpi->DstReg),
@@ -926,11 +925,13 @@ static GLuint *t_opcode_xpd(struct r300_vertex_program *vp,
NegateBase ? VSF_FLAG_ALL :
VSF_FLAG_NONE) | (src[0].RelAddr << 4);
inst[3] =
- PVS_SOURCE_OPCODE(*u_temp_i + 1, PVS_SRC_SELECT_X,
+ PVS_SOURCE_OPCODE(*u_temp_i, PVS_SRC_SELECT_X,
PVS_SRC_SELECT_Y, PVS_SRC_SELECT_Z,
PVS_SRC_SELECT_W, PVS_SRC_REG_TEMPORARY,
VSF_FLAG_NONE);
+ (*u_temp_i)--;
+
return inst;
}