diff options
author | Zack Rusin <zackr@vmware.com> | 2010-03-31 22:15:12 -0400 |
---|---|---|
committer | Zack Rusin <zackr@vmware.com> | 2010-03-31 22:15:12 -0400 |
commit | ae5487d4276007e466b6a7c783d6fb740f9539c5 (patch) | |
tree | 0886144bd2a074551d938dec47a41f7fb7ec0dcf /src/gallium/auxiliary/draw/draw_llvm_translate.c | |
parent | 880e3fb09b538f6f0b6fad2db7e0e10e9df43555 (diff) |
draw llvm: fix iteration over buffers
fetching was converting garbage
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_llvm_translate.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_llvm_translate.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm_translate.c b/src/gallium/auxiliary/draw/draw_llvm_translate.c index 260568aaa4..bc17d3861a 100644 --- a/src/gallium/auxiliary/draw/draw_llvm_translate.c +++ b/src/gallium/auxiliary/draw/draw_llvm_translate.c @@ -10,6 +10,7 @@ #include "gallivm/lp_bld_flow.h" #include "gallivm/lp_bld_debug.h" #include "gallivm/lp_bld_tgsi.h" +#include "gallivm/lp_bld_printf.h" #include "util/u_memory.h" #include "pipe/p_state.h" @@ -431,10 +432,10 @@ fetch(LLVMBuilderRef builder, for (i = 0; i < nr_components; ++i) { LLVMValueRef src_index = LLVMConstInt(LLVMInt32Type(), offset, 0); LLVMValueRef dst_index = LLVMConstInt(LLVMInt32Type(), i, 0); - LLVMValueRef src_tmp = LLVMBuildGEP(builder, ptr, &src_index, 1, ""); + LLVMValueRef src_tmp; LLVMValueRef component; - src_tmp = LLVMBuildLoad(builder, src_tmp, ""); + src_tmp = LLVMBuildGEP(builder, ptr, &src_index, 1, "src_tmp"); /* convert src_tmp to float */ component = func(builder, src_tmp); |