summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2010-06-18 20:42:33 -0700
committerMarek Olšák <[email protected]>2010-07-03 04:27:09 +0200
commit0dbdcb43215c13dd7d7f83c1f1cdbfe6706109f0 (patch)
treed48058f5e5abeb54bac279524e05c8eb2046f955 /src/mesa
parent7f575309437100dcd9b1f72320845f56ac581919 (diff)
r300/compiler: Don't continue copy propagation inside loops.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_optimize.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c b/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
index e760b59bd41..eca06515367 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
@@ -162,6 +162,11 @@ static void peephole(struct radeon_compiler * c, struct rc_instruction * inst_mo
for(struct rc_instruction * inst = inst_mov->Next;
inst != &c->Program.Instructions;
inst = inst->Next) {
+ /* XXX In the future we might be able to make the optimizer
+ * smart enough to handle loops. */
+ if(inst->U.I.Opcode == RC_OPCODE_BGNLOOP){
+ return;
+ }
rc_for_all_reads_mask(inst, peephole_scan_read, &s);
rc_for_all_writes_mask(inst, peephole_scan_write, &s);
if (s.Conflict)