r300: Cleaned up the XPD opcode temporary register usage.
authorOliver McFadden <z3ro.geek@gmail.com>
Thu, 28 Feb 2008 09:53:29 +0000 (09:53 +0000)
committerOliver McFadden <z3ro.geek@gmail.com>
Sat, 1 Mar 2008 06:33:06 +0000 (06:33 +0000)
src/mesa/drivers/dri/r300/r300_vertprog.c

index 05176e14ce59351e51c7e2ea49b565e2d317f000..563b02b7a5cc58574146e7c4deb9882d33bec5b9 100644 (file)
@@ -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;
 }