mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
glsl: Add utility function to extract 64-bit sign
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
ec6e823a99
commit
3e4d5ea7b8
1 changed files with 7 additions and 0 deletions
|
|
@ -159,3 +159,10 @@ __fne64(uint64_t a, uint64_t b)
|
|||
|
||||
return !__feq64_nonnan(a, b);
|
||||
}
|
||||
|
||||
/* Returns the sign bit of the double-precision floating-point value `a'.*/
|
||||
uint
|
||||
__extractFloat64Sign(uint64_t a)
|
||||
{
|
||||
return unpackUint2x32(a).y >> 31;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue