summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-09-29 12:15:14 -0700
committerVinson Lee <[email protected]>2010-09-29 12:15:14 -0700
commita9d5808232087ace460fe0d30dc9b8a49c30fd5c (patch)
tree04e788489e9db3a08279a7ba5dd8dbdab533c10a /src/mesa
parent22c06a08e76a4edb468e0a6a85dd4e5c0483d275 (diff)
r300/compiler: Move declaration before code.
Fixes this GCC warning on linux-x86 build. radeon_pair_regalloc.c: In function ‘rc_pair_regalloc_inputs_only’: radeon_pair_regalloc.c:330: warning: ISO C90 forbids mixed declarations and code
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c
index c73845512f8..91524f5ec68 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c
@@ -322,12 +322,13 @@ void rc_pair_regalloc_inputs_only(struct radeon_compiler *cc, void *user)
{
struct r300_fragment_program_compiler *c = (struct r300_fragment_program_compiler*)cc;
struct regalloc_state s;
+ int temp_reg_offset;
compute_live_intervals(cc, &s);
c->AllocateHwInputs(c, &alloc_input, &s);
- int temp_reg_offset = 0;
+ temp_reg_offset = 0;
for (unsigned i = 0; i < RC_REGISTER_MAX_INDEX; i++) {
if (s.Input[i].Allocated && temp_reg_offset <= s.Input[i].Index)
temp_reg_offset = s.Input[i].Index + 1;