aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-11-08 11:39:42 -0700
committerBrian <[email protected]>2007-11-08 11:39:42 -0700
commitfa63d6d32c93a5d8cd88c0c7d4a8ac4c1c1c1a9d (patch)
tree15c68d5e5ae22c2c30c1225c29356fc2e5b2d51c /src/mesa/pipe
parent02f7f46fa15c7d31d774c638684d4f5b81e360ec (diff)
check for divide by W flag when translating TGSI_OPCODE_TEX (fixes projected textures)
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/i915simple/i915_fpc_translate.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/pipe/i915simple/i915_fpc_translate.c b/src/mesa/pipe/i915simple/i915_fpc_translate.c
index 7838031c17b..b867b87e745 100644
--- a/src/mesa/pipe/i915simple/i915_fpc_translate.c
+++ b/src/mesa/pipe/i915simple/i915_fpc_translate.c
@@ -831,7 +831,13 @@ i915_translate_instruction(struct i915_fp_compile *p,
break;
case TGSI_OPCODE_TEX:
- emit_tex(p, inst, T0_TEXLD);
+ if (inst->FullSrcRegisters[0].SrcRegisterExtSwz.ExtDivide
+ == TGSI_EXTSWIZZLE_W) {
+ emit_tex(p, inst, T0_TEXLDP);
+ }
+ else {
+ emit_tex(p, inst, T0_TEXLD);
+ }
break;
case TGSI_OPCODE_TXB: