aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-10-25 09:03:50 +0000
committerJosé Fonseca <[email protected]>2009-10-25 09:53:48 +0000
commit8d80fd3f554cab2db962a903ce4eaba7c8fed7ac (patch)
tree4b59559381ee2c798cb6f9cca211b1dca9240a9a /src/gallium/drivers
parentb544ab72994a7eda1e8c17fa217213ff3713dd99 (diff)
llvmpipe: Allow different signs when unpacking.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_pack.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_pack.c b/src/gallium/drivers/llvmpipe/lp_bld_pack.c
index fe82fda0392..bc360ad77ad 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_pack.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_pack.c
@@ -159,11 +159,10 @@ lp_build_unpack2(LLVMBuilderRef builder,
assert(!src_type.floating);
assert(!dst_type.floating);
- assert(dst_type.sign == src_type.sign);
assert(dst_type.width == src_type.width * 2);
assert(dst_type.length * 2 == src_type.length);
- if(src_type.sign) {
+ if(dst_type.sign && src_type.sign) {
/* Replicate the sign bit in the most significant bits */
msb = LLVMBuildAShr(builder, src, lp_build_int_const_scalar(src_type, src_type.width - 1), "");
}