From 0fc937da5d16cb21055db157fd085b727050bdaa Mon Sep 17 00:00:00 2001 From: nobled Date: Fri, 6 Aug 2010 16:14:44 +0000 Subject: [PATCH] draw: Use the correct type Two integers were being operated on as a vector of floats. This is a bug uncovered by fixing this bug: http://bugs.freedesktop.org/29407 --- src/gallium/auxiliary/draw/draw_llvm.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index de99b00..240eaeb 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -683,7 +683,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant) unsigned i, j; struct lp_build_context bld; struct lp_build_loop_state lp_loop; - struct lp_type vs_type = lp_type_float_vec(32); + struct lp_type int_type; const int max_vertices = 4; LLVMValueRef outputs[PIPE_MAX_SHADER_OUTPUTS][NUM_CHANNELS]; void *code; @@ -732,7 +732,8 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant) builder = LLVMCreateBuilder(); LLVMPositionBuilderAtEnd(builder, block); - lp_build_context_init(&bld, builder, vs_type); + int_type = lp_type_int(32); + lp_build_context_init(&bld, builder, int_type); end = lp_build_add(&bld, start, count); -- 1.5.4.3