From: Brian Date: Thu, 8 Nov 2007 18:39:42 +0000 (-0700) Subject: check for divide by W flag when translating TGSI_OPCODE_TEX (fixes projected textures) X-Git-Tag: 062012170305~17580^2~390^2~3346 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa63d6d32c93a5d8cd88c0c7d4a8ac4c1c1c1a9d;p=profile%2Fivi%2Fmesa.git check for divide by W flag when translating TGSI_OPCODE_TEX (fixes projected textures) --- diff --git a/src/mesa/pipe/i915simple/i915_fpc_translate.c b/src/mesa/pipe/i915simple/i915_fpc_translate.c index 7838031..b867b87 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: