diff options
author | Markus Amsler <markus.amsler@oribi.org> | 2008-03-17 12:03:54 +0100 |
---|---|---|
committer | Jerome Glisse <glisse@freedesktop.org> | 2008-03-17 12:03:54 +0100 |
commit | c48212fe5861291efd134b35e67568c79b15f960 (patch) | |
tree | 916e20e1f6c1f960cae39ead31a345c3e42a6464 /src | |
parent | f0c8863dbb71b2c3605bb8eb9526c7d8d13793cf (diff) |
r300: Simplify r300VAPInputRoute1.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_emit.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_emit.c b/src/mesa/drivers/dri/r300/r300_emit.c index 8e1d801a8d..deb62b2762 100644 --- a/src/mesa/drivers/dri/r300/r300_emit.c +++ b/src/mesa/drivers/dri/r300/r300_emit.c @@ -238,14 +238,10 @@ static GLuint r300VAPInputRoute1Swizzle(int swizzle[4]) GLuint r300VAPInputRoute1(uint32_t * dst, int swizzle[][4], GLuint nr) { GLuint i; + uint16_t * dst16 = (uint16_t *) dst; - for (i = 0; i + 1 < nr; i += 2) { - dst[i >> 1] = r300VAPInputRoute1Swizzle(swizzle[i]) | R300_INPUT_ROUTE_ENABLE; - dst[i >> 1] |= (r300VAPInputRoute1Swizzle(swizzle[i + 1]) | R300_INPUT_ROUTE_ENABLE) << 16; - } - - if (nr & 1) { - dst[nr >> 1] = r300VAPInputRoute1Swizzle(swizzle[nr - 1]) | R300_INPUT_ROUTE_ENABLE; + for (i = 0; i < nr; i++) { + dst16[i] = r300VAPInputRoute1Swizzle(swizzle[i]) | R300_INPUT_ROUTE_ENABLE; } return (nr + 1) >> 1; |