From 2ccae040a458ad0f95ee46916e2ea467d5cf9d02 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 9 Mar 2010 09:37:50 -0700 Subject: gallivm: checkpoint: nearest mipmap filtering The LOD is computed from texcoord partial derivatives and used to select a mipmap level. Still some bugs in texel fetching. Lots of rough edges and unfinished parts but the basics are in place. Lots of changes to the lp_bld_arit.c code to support non-vector/scalar datatypes. --- src/gallium/auxiliary/gallivm/lp_bld_const.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/gallium/auxiliary/gallivm/lp_bld_const.c') diff --git a/src/gallium/auxiliary/gallivm/lp_bld_const.c b/src/gallium/auxiliary/gallivm/lp_bld_const.c index c8eaa8c394..53447757e8 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_const.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_const.c @@ -264,10 +264,16 @@ lp_build_one(struct lp_type type) for(i = 1; i < type.length; ++i) elems[i] = elems[0]; - return LLVMConstVector(elems, type.length); + if (type.length == 1) + return elems[0]; + else + return LLVMConstVector(elems, type.length); } +/** + * Build constant-valued vector from a scalar value. + */ LLVMValueRef lp_build_const_scalar(struct lp_type type, double val) -- cgit v1.2.3