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>
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user