[Mesa-dev] [PATCH 3/4] r600g/llvm: Fix texelFetchOffset-2D
Vincent Lejeune
vljn at ovi.com
Mon May 20 07:49:21 PDT 2013
---
src/gallium/drivers/r600/r600_llvm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm.c
index 3d2c492..c1809b3 100644
--- a/src/gallium/drivers/r600/r600_llvm.c
+++ b/src/gallium/drivers/r600/r600_llvm.c
@@ -460,6 +460,12 @@ static void llvm_emit_tex(
for (c = 1; c < emit_data->arg_count; ++c)
args[c] = emit_data->args[c];
+ if (emit_data->inst->Instruction.Opcode == TGSI_OPCODE_TXF) {
+ args[1] = LLVMBuildShl(gallivm->builder, args[1], lp_build_const_int32(gallivm, 1), "");
+ args[2] = LLVMBuildShl(gallivm->builder, args[2], lp_build_const_int32(gallivm, 1), "");
+ args[3] = LLVMBuildShl(gallivm->builder, args[3], lp_build_const_int32(gallivm, 1), "");
+ }
+
sampler_src = emit_data->inst->Instruction.NumSrcRegs-1;
args[c++] = lp_build_const_int32(gallivm,
--
1.8.2.1
More information about the mesa-dev
mailing list