From 978df710f22562ae766b1fe60e8ebf40d20a6e6b Mon Sep 17 00:00:00 2001 From: James Benton Date: Wed, 30 May 2012 14:36:44 +0100 Subject: [PATCH] gallivm: Fix bug in lp_build_one which would incorrectly return a vector for length 1. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: José Fonseca --- src/gallium/auxiliary/gallivm/lp_bld_const.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_const.c b/src/gallium/auxiliary/gallivm/lp_bld_const.c index 003901aabe6..24ed23adc35 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_const.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_const.c @@ -269,7 +269,7 @@ lp_build_one(struct gallivm_state *gallivm, struct lp_type type) else { /* special case' -- 1.0 for normalized types is more easily attained if * we start with a vector consisting of all bits set */ - LLVMTypeRef vec_type = LLVMVectorType(elem_type, type.length); + LLVMTypeRef vec_type = lp_build_vec_type(gallivm, type); LLVMValueRef vec = LLVMConstAllOnes(vec_type); #if 0 -- 2.30.2