summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2010-09-09 10:19:52 -0700
committerTom Stellard <[email protected]>2010-09-10 18:18:10 -0700
commit3fffcb317c90b03cad733bca027ff2a978567306 (patch)
treed9655ef7f262ba6e064b96485eeb8f0d2c4c5570 /src/mesa/drivers/dri/r300
parent8b67159e9a8f2e3782dfb78bc612e2753395563a (diff)
r300/compiler: Don't use presubtract in TEX instructions
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_optimize.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c b/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
index 88aac949a10..0c6b1bd720a 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
@@ -192,7 +192,7 @@ static void copy_propagate(struct radeon_compiler * c, struct rc_instruction * i
/* It is possible to do copy propigation in this situation,
* just not right now, see peephole_add_presub_inv() */
if (inst_mov->U.I.PreSub.Opcode != RC_PRESUB_NONE &&
- info->NumSrcRegs > 2) {
+ (info->NumSrcRegs > 2 || info->HasTexture)) {
return;
}
@@ -559,6 +559,11 @@ static int presub_helper(
break;
}
+ if (info->HasTexture) {
+ can_remove = 0;
+ break;
+ }
+
/* We can't use more than one presubtract value in an
* instruction, unless the two prsubtract operations
* are the same and read from the same registers. */