commit 64cd5d3e3333948b551bd8c08f225dfbc86a8919 Author: Brian Paul Date: Tue Sep 4 10:02:20 2012 -0600 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 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?