diff options
author | Brian Paul <brianp@vmware.com> | 2010-03-09 09:37:50 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-03-09 09:40:41 -0700 |
commit | 2ccae040a458ad0f95ee46916e2ea467d5cf9d02 (patch) | |
tree | 176d693ba858c88cec6148915377a24b520f049e /src/gallium/auxiliary/gallivm/lp_bld_const.c | |
parent | e0f10a6fca34619f61c3533b68d89dcb1ff2627c (diff) |
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.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_const.c')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_const.c | 8 |
1 files changed, 7 insertions, 1 deletions
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) |