summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/macros.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-09-04 10:02:20 -0600
committerBrian Paul <[email protected]>2012-09-04 11:36:58 -0600
commitf73ffacbf0c65ad843406af37aa35e9112bc8038 (patch)
tree218224a7b159b7d61964a5b9be16227c10e41f7a /src/mesa/main/macros.h
parent8eaa36317a0a2911cb78066947bc841dd8ce86c8 (diff)
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 <[email protected]>
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 fc6f2a28f20..04d59d79c07 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?