summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu.herrb@laas.fr>2010-04-18 16:55:38 -0700
committerBrian Paul <brianp@vmware.com>2010-04-19 09:33:53 -0600
commitf4553d99c63e4bcb4d023c9e33b72fedd0dfbdc1 (patch)
treed8fc89d4b283a0bda2f78a39ea92c7661283dea4 /src
parentc39ab02ae9be9c6adf8f2d1382fed88f1daf03bf (diff)
radeon: Let this build with gcc 3.3
Declaring the loop index inside for () is not supported by this version. Signed-off-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
index e0e271b7711..6c570a571af 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
@@ -512,8 +512,10 @@ static radeon_mipmap_tree * get_biggest_matching_miptree(radeonTexObj *texObj,
unsigned mtCount = 0;
unsigned maxMtIndex = 0;
radeon_mipmap_tree *tmp;
+ unsigned int level;
+ int i;
- for (unsigned level = firstLevel; level <= lastLevel; ++level) {
+ for (level = firstLevel; level <= lastLevel; ++level) {
radeon_texture_image *img = get_radeon_texture_image(texObj->base.Image[0][level]);
unsigned found = 0;
// TODO: why this hack??
@@ -523,7 +525,7 @@ static radeon_mipmap_tree * get_biggest_matching_miptree(radeonTexObj *texObj,
if (!img->mt)
continue;
- for (int i = 0; i < mtCount; ++i) {
+ for (i = 0; i < mtCount; ++i) {
if (mts[i] == img->mt) {
found = 1;
mtSizes[i] += img->mt->levels[img->mtlevel].size;
@@ -544,7 +546,7 @@ static radeon_mipmap_tree * get_biggest_matching_miptree(radeonTexObj *texObj,
return NULL;
}
- for (int i = 1; i < mtCount; ++i) {
+ for (i = 1; i < mtCount; ++i) {
if (mtSizes[i] > mtSizes[maxMtIndex]) {
maxMtIndex = i;
}