r600g/llvm: Undef z and w component of 2D TXP inst
authorVincent Lejeune <vljn@ovi.com>
Thu, 5 Sep 2013 22:26:16 +0000 (00:26 +0200)
committerVincent Lejeune <vljn@ovi.com>
Wed, 2 Oct 2013 15:30:14 +0000 (17:30 +0200)
src/gallium/drivers/r600/r600_llvm.c

index 3fe6a81a5402f47567862666f6002e25011ca06f..b1b88b8d94a02d51e90901c3ce1e935c2486d2c0 100644 (file)
@@ -433,7 +433,8 @@ static void llvm_emit_tex(
                }
        }
 
-       if (emit_data->inst->Instruction.Opcode == TGSI_OPCODE_TEX) {
+       if (emit_data->inst->Instruction.Opcode == TGSI_OPCODE_TEX ||
+               emit_data->inst->Instruction.Opcode == TGSI_OPCODE_TXP) {
                LLVMValueRef Vector[4] = {
                        LLVMBuildExtractElement(gallivm->builder, emit_data->args[0],
                                lp_build_const_int32(gallivm, 0), ""),