summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/macros.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2012-09-04 10:02:20 -0600
committerBrian Paul <brianp@vmware.com>2012-09-04 11:36:58 -0600
commitf73ffacbf0c65ad843406af37aa35e9112bc8038 (patch)
tree218224a7b159b7d61964a5b9be16227c10e41f7a /src/mesa/main/macros.h
parent8eaa36317a0a2911cb78066947bc841dd8ce86c8 (diff)
downloadexternal_mesa3d-f73ffacbf0c65ad843406af37aa35e9112bc8038.zip
external_mesa3d-f73ffacbf0c65ad843406af37aa35e9112bc8038.tar.gz
external_mesa3d-f73ffacbf0c65ad843406af37aa35e9112bc8038.tar.bz2
mesa: fix DIFFERENT_SIGNS() function
Looks like converting this to a macro, returning bool, caused us to lose the high (31st) bit result. Fixes piglit fbo-1d test. Strange that none of the other tests I ran caught this. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=54365 Tested-by: Vinson Lee <vlee@freedesktop.org>
Diffstat (limited to 'src/mesa/main/macros.h')
-rw-r--r--src/mesa/main/macros.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index fc6f2a2..04d59d7 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -711,7 +711,7 @@ DIFFERENT_SIGNS(GLfloat x, GLfloat y)
fi_type xfi, yfi;
xfi.f = x;
yfi.f = y;
- return (xfi.i ^ yfi.i) & (1u << 31);
+ return !!((xfi.i ^ yfi.i) & (1u << 31));
#else
/* Could just use (x*y<0) except for the flatshading requirements.
* Maybe there's a better way?