r300: Rearranged the DWORD construction in r300VAPInputRoute0 for clarity.
authorOliver McFadden <z3ro.geek@gmail.com>
Sat, 26 May 2007 21:38:52 +0000 (21:38 +0000)
committerOliver McFadden <z3ro.geek@gmail.com>
Sat, 26 May 2007 21:38:52 +0000 (21:38 +0000)
Doesn't actually change anything; just makes it easier to read.

src/mesa/drivers/dri/r300/r300_emit.c

index f42bcd9e45a7f060647787221c99e0721c6bca9a..2390d9be65395b3d27c71bcad537c76c36ce72d8 100644 (file)
@@ -212,10 +212,10 @@ static GLuint r300VAPInputRoute0(uint32_t * dst, GLvector4f ** attribptr,
 {
        GLuint i, dw;
 
-       /* dw: size, inputs, stop bit, type */
+       /* type, inputs, stop bit, size */
        for (i = 0; i + 1 < nr; i += 2) {
-               dw = (attribptr[tab[i]]->size - 1) | (inputs[tab[i]] << 8) | R300_INPUT_ROUTE_FLOAT;
-               dw |= ((attribptr[tab[i + 1]]->size - 1) | (inputs[tab[i + 1]] << 8) | R300_INPUT_ROUTE_FLOAT) << 16;
+               dw = R300_INPUT_ROUTE_FLOAT | (inputs[tab[i]] << 8) | (attribptr[tab[i]]->size - 1);
+               dw |= (R300_INPUT_ROUTE_FLOAT | (inputs[tab[i + 1]] << 8) | (attribptr[tab[i + 1]]->size - 1)) << 16;
                if (i + 2 == nr) {
                        dw |= (1 << (13 + 16));
                }
@@ -223,7 +223,7 @@ static GLuint r300VAPInputRoute0(uint32_t * dst, GLvector4f ** attribptr,
        }
 
        if (nr & 1) {
-               dw = (attribptr[tab[nr - 1]]->size - 1) | (inputs[tab[nr - 1]] << 8) | R300_INPUT_ROUTE_FLOAT;
+               dw = R300_INPUT_ROUTE_FLOAT | (inputs[tab[nr - 1]] << 8) | (attribptr[tab[nr - 1]]->size - 1);
                dw |= 1 << 13;
                dst[nr >> 1] = dw;
        }