summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2008-05-03 09:09:57 -0700
committerCorbin Simpson <[email protected]>2008-05-03 09:09:57 -0700
commitb79a769b2d878d6e8e55f675209ffa7f3f2a6f68 (patch)
tree6d23492dfb00078ce121274ed3973f02a3a8d2d0 /src/mesa
parent4ef195a36946c8d587d129abd54683c73eecc304 (diff)
r5xx: Fix for loops.
Thanks to dli in IRC for pointing this out.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/r500_fragprog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r500_fragprog.c b/src/mesa/drivers/dri/r300/r500_fragprog.c
index c5369b1dde8..b08beb617ff 100644
--- a/src/mesa/drivers/dri/r300/r500_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r500_fragprog.c
@@ -93,7 +93,8 @@ static inline GLuint make_rgb_swizzle(struct prog_src_register src) {
GLuint swiz = 0x0;
GLuint temp;
/* This could be optimized, but it should be plenty fast already. */
- for (int i = 0; i < 3; i++) {
+ int i;
+ for (i = 0; i < 3; i++) {
temp = (src.Swizzle >> i*3) & 0x7;
/* Fix SWIZZLE_ONE */
if (temp == 5) temp++;
@@ -111,7 +112,8 @@ static inline GLuint make_alpha_swizzle(struct prog_src_register src) {
static inline GLuint make_strq_swizzle(struct prog_src_register src) {
GLuint swiz = 0x0;
GLuint temp = src.Swizzle;
- for (int i = 0; i < 4; i++) {
+ int i;
+ for (i = 0; i < 4; i++) {
swiz += (temp & 0x3) << i*2;
temp >>= 3;
}