mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 06:40:22 +01:00
glsl: correct bitcast-helpers
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> (cherry picked from commit88f909eb37)
This commit is contained in:
parent
f4faf5cbd7
commit
109137ee7b
1 changed files with 2 additions and 2 deletions
|
|
@ -106,7 +106,7 @@ bitcast_i642d(int64_t i)
|
|||
return d;
|
||||
}
|
||||
|
||||
static double
|
||||
static uint64_t
|
||||
bitcast_d2u64(double d)
|
||||
{
|
||||
assert(sizeof(double) == sizeof(uint64_t));
|
||||
|
|
@ -115,7 +115,7 @@ bitcast_d2u64(double d)
|
|||
return u;
|
||||
}
|
||||
|
||||
static double
|
||||
static int64_t
|
||||
bitcast_d2i64(double d)
|
||||
{
|
||||
assert(sizeof(double) == sizeof(int64_t));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue