summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_eu_compact.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2014-09-27 09:42:33 -0700
committerMatt Turner <mattst88@gmail.com>2014-09-29 15:59:16 -0700
commita0df258f8961d25caab7c4d1ccae3402f998f454 (patch)
treeb6a71fa0e5d81fb07e36df879efec30e7153ce41 /src/mesa/drivers/dri/i965/brw_eu_compact.c
parenta36631b74c97cfc1862ed50fbaac174a4aecec31 (diff)
i965/compaction: Move variable declarations to their uses.
Tested-by: Mark Janes <mark.a.janes@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_eu_compact.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_compact.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c
index 2807366b3ee..e660ad340b8 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_compact.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c
@@ -1378,7 +1378,6 @@ brw_compact_instructions(struct brw_compile *p, int start_offset,
brw_inst *insn = store + offset;
int this_old_ip = old_ip[offset / sizeof(brw_compact_inst)];
int this_compacted_count = compacted_counts[this_old_ip];
- int target_old_ip, target_compacted_count;
switch (brw_inst_opcode(brw, insn)) {
case BRW_OPCODE_BREAK:
@@ -1417,8 +1416,8 @@ brw_compact_instructions(struct brw_compile *p, int start_offset,
/* Jump Count is in units of compacted instructions on Gen6. */
int jump_count_compacted = brw_inst_gen6_jump_count(brw, insn);
- target_old_ip = this_old_ip + (jump_count_compacted / 2);
- target_compacted_count = compacted_counts[target_old_ip];
+ int target_old_ip = this_old_ip + (jump_count_compacted / 2);
+ int target_compacted_count = compacted_counts[target_old_ip];
jump_count_compacted -= (target_compacted_count - this_compacted_count);
brw_inst_set_gen6_jump_count(brw, insn, jump_count_compacted);
} else {
@@ -1441,8 +1440,8 @@ brw_compact_instructions(struct brw_compile *p, int start_offset,
int shift = 3;
int jump_compacted = brw_inst_imm_d(brw, insn) >> shift;
- target_old_ip = this_old_ip + (jump_compacted / 2);
- target_compacted_count = compacted_counts[target_old_ip];
+ int target_old_ip = this_old_ip + (jump_compacted / 2);
+ int target_compacted_count = compacted_counts[target_old_ip];
jump_compacted -= (target_compacted_count - this_compacted_count);
brw_inst_set_imm_ud(brw, insn, jump_compacted << shift);
}