mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
llvmpipe: fix broken lp_build_abs()
This commit is contained in:
parent
e20547042c
commit
96ec4eb755
1 changed files with 2 additions and 1 deletions
|
|
@ -628,7 +628,8 @@ lp_build_abs(struct lp_build_context *bld,
|
|||
if(type.floating) {
|
||||
/* Mask out the sign bit */
|
||||
LLVMTypeRef int_vec_type = lp_build_int_vec_type(type);
|
||||
LLVMValueRef mask = lp_build_int_const_scalar(type, ((unsigned long long)1 << type.width) - 1);
|
||||
unsigned long absMask = ~(1 << (type.width - 1));
|
||||
LLVMValueRef mask = lp_build_int_const_scalar(type, ((unsigned long long) absMask));
|
||||
a = LLVMBuildBitCast(bld->builder, a, int_vec_type, "");
|
||||
a = LLVMBuildAnd(bld->builder, a, mask, "");
|
||||
a = LLVMBuildBitCast(bld->builder, a, vec_type, "");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue