Summary: | macros in builtin_functions.cpp make invalid assumptions about M_PI definitions | ||
---|---|---|---|
Product: | Mesa | Reporter: | Jonathan Gray <jsg> |
Component: | glsl-compiler | Assignee: | Matt Turner <mattst88> |
Status: | RESOLVED FIXED | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | git | ||
Hardware: | Other | ||
OS: | OpenBSD | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Jonathan Gray
2014-05-13 15:03:23 UTC
The casting was introduced in OpenBSD math.h rev 1.33 apparently a change required by POSIX? revision 1.33 date: 2014/05/03 16:13:03; author: martynas; state: Exp; lines: +30 -14; - Provide extended-precision math constants req'd by POSIX - Explicitly cast double-precision constants as needed for FLT_EVAL_METHOD = 2 archs OK guenther@, ratchov@ http://www.openbsd.org/cgi-bin/cvsweb/src/include/math.h.diff?r1=1.32;r2=1.33;f=h This does seem really dodgy. It seems like we ought to just do: #define M_PIf ((float) M_PI) #define M_PI_2f ((float) M_PI_2) #define M_PI_4f ((float) M_PI_4) Fine by me. Jonathan, want to send a patch? I sent out a patch based on Kenneths' suggestion that Matt has since merged. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.