glsl: Add utility function to extract 64-bit sign
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:

committed by
Matt Turner

parent
ec6e823a99
commit
3e4d5ea7b8
@@ -159,3 +159,10 @@ __fne64(uint64_t a, uint64_t b)
|
|||||||
|
|
||||||
return !__feq64_nonnan(a, 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;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user