mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-10 13:40:31 +01:00
llvmpipe: Allow different signs when unpacking.
This commit is contained in:
parent
b544ab7299
commit
8d80fd3f55
1 changed files with 1 additions and 2 deletions
|
|
@ -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), "");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue