Without this, we'll incorrectly round off huge values to the nearest
representable double instead of keeping it at the exact value as
we're supposed to.
Found by inspecting compiler-warnings.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 85faf5082f ("glsl: Add 64-bit integer support for constant expressions")
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
return d;
}
-static double
+static uint64_t
bitcast_d2u64(double d)
{
assert(sizeof(double) == sizeof(uint64_t));
return u;
}
-static double
+static int64_t
bitcast_d2i64(double d)
{
assert(sizeof(double) == sizeof(int64_t));