Summary: | [EASYFIX] glxgears should use sincos(3) | ||
---|---|---|---|
Product: | Mesa | Reporter: | Mike A. Harris <mharris> |
Component: | Demos | Assignee: | Xorg Project Team <xorg-team> |
Status: | RESOLVED WONTFIX | QA Contact: | |
Severity: | normal | ||
Priority: | high | CC: | ajax, roland.mainz |
Version: | git | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
URL: | https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=90053 | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Mike A. Harris
2005-02-01 01:16:41 UTC
Additional Comment #1 From John Ellson (ellson@research.att.com) on 2003-06-13 sincos() is not very portable. Here is the configure test and a sincos macro that we've used with success in graphviz: --------------------- configure test ----------------------- AC_MSG_CHECKING(if have working sincos()) AC_TRY_RUN([ #include <stdio.h> #include <assert.h> #define PI 3.14159265358979323846 extern void sincos(double x, double *s, double *c); int main () { double sinx=0.0, cosx=1.0; sincos(PI/2.0,&sinx,&cosx); assert(sinx>0.9999999); assert(sinx<1.0000001); assert(cosx<0.0000001); assert(cosx>(-0.0000001)); return 0; }] , AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED(HAVE_SINCOS,1,[Define if libm provides a *working* sincos function]) , AC_MSG_RESULT(no) , AC_MSG_RESULT(no - assumed because cross-compiling) ) ------------------ macro --------------------- #ifndef HAVE_SINCOS void sincos(x,s,c) double x,*s,*c; { *s = sin(x); *c = cos(x); } #else extern void sincos(double x, double *s, double *c); #endif Someone would have to translate the autotool test above to an Imake test of some sort, if there isn't one already present. Shouldn't be that difficult. We were tracking this in our bugzilla, but it was low priority enough that we might never get around to doing it, but I figured someone else in the community might want to take a crack at it, so it'd be useful to log it here perhaps. Original bug report: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=90053 glxgears properly lives in Mesa, so i wouldn't bother with either the configure test or the Imake test since Mesa uses neither. I suggest closing this bug. There no /real/ benefit in using sincos(). Why bother? last thing we want is people thinking gears is a benchmark. |
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.