summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-05-08 23:07:09 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-05-08 23:29:05 +0100
commitff7542ab90154769930c80d58597cfec40844bd9 (patch)
treef71e1c8c29f8bf5b83b662fe4759c54a221d2ede /src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
parentffebc7f2a7eaa2db5c998448412a91a7594f241c (diff)
gallivm: Actually do floor/ceil/trunc for scalars.
Also start axing the code duplication for scalar case. The olution is to treat the scalar case specially in a few innermost functions, and leave outer functions untouched.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_swizzle.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_swizzle.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
index e101d2866b..6a3c8f3f3a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
@@ -71,6 +71,8 @@ lp_build_broadcast_scalar(struct lp_build_context *bld,
LLVMValueRef res;
unsigned i;
+ assert(lp_check_elem_type(type, LLVMTypeOf(scalar)));
+
res = bld->undef;
for(i = 0; i < type.length; ++i) {
LLVMValueRef index = LLVMConstInt(LLVMInt32Type(), i, 0);