diff options
author | Vinson Lee <vlee@vmware.com> | 2010-09-29 11:19:55 -0700 |
---|---|---|
committer | Vinson Lee <vlee@vmware.com> | 2010-09-29 11:19:55 -0700 |
commit | 483971e649946bd8d3399240de5b483be9bd3402 (patch) | |
tree | ea91af5f2bb146afc3a65b2e6a6db829d80d5715 /src/mesa/drivers/dri | |
parent | 760d7c5d7d8e2c77866917853cab6b3c033815f6 (diff) |
r300/compiler: Move declaration before code.
Fixes this GCC warning on linux-x86 build.
radeon_emulate_loops.c: In function ‘rc_emulate_loops’:
radeon_emulate_loops.c:517: warning: ISO C90 forbids mixed declarations and code
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/r300/compiler/radeon_emulate_loops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_emulate_loops.c b/src/mesa/drivers/dri/r300/compiler/radeon_emulate_loops.c index 02a52f92fc..205eecd112 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_emulate_loops.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_emulate_loops.c @@ -511,11 +511,12 @@ void rc_emulate_loops(struct radeon_compiler *c, void *user) * loops are unrolled first. */ for( i = s->LoopCount - 1; i >= 0; i-- ){ + unsigned int iterations; + if(!s->Loops[i].EndLoop){ continue; } - unsigned int iterations = loop_max_possible_iterations( - s->C, &s->Loops[i]); + iterations = loop_max_possible_iterations(s->C, &s->Loops[i]); unroll_loop(s->C, &s->Loops[i], iterations); } } |