summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorVincent Lejeune <[email protected]>2013-05-18 22:22:41 +0200
committerVincent Lejeune <[email protected]>2013-05-20 20:23:14 +0200
commit9a95fb16053746578be856a76f3177777ef157f1 (patch)
treec2aef5d522ee608221aa56e680c7a2d91baf2ab4 /src/gallium/drivers/r600
parent32c9cbb38fc03d028500b1904ff4d66a07e9471e (diff)
r600g/llvm: Fix texelFetchOffset-2D
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/r600_llvm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm.c
index 3d2c492773c..c1809b30cdd 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,