Re: [Mesa-dev] [PATCH 12/13] mesa/math: Avoid double promotion.

2015-07-14 Thread Mike Stroyan
What we want here is c = cosf( angle * (float)(M_PI / 180.0) ); so the compiler can evaluate the constant expression and use a float representation for the result. I always find it a little awkward deciding between using OpenGL's types like GLfloat or simple language types when working with syste

Re: [Mesa-dev] [PATCH 12/13] mesa/math: Avoid double promotion.

2015-07-14 Thread Iago Toral
On Tue, 2015-07-14 at 13:19 +0200, Iago Toral wrote: > On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: > > --- > > src/mesa/math/m_clip_tmp.h | 20 ++--- > > src/mesa/math/m_matrix.c | 70 > > +++--- > > src/mesa/math/m_norm_tmp.h | 2 +- >

Re: [Mesa-dev] [PATCH 12/13] mesa/math: Avoid double promotion.

2015-07-14 Thread Iago Toral
On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: > --- > src/mesa/math/m_clip_tmp.h | 20 ++--- > src/mesa/math/m_matrix.c | 70 > +++--- > src/mesa/math/m_norm_tmp.h | 2 +- > 3 files changed, 46 insertions(+), 46 deletions(-) > > diff --g

[Mesa-dev] [PATCH 12/13] mesa/math: Avoid double promotion.

2015-07-13 Thread Matt Turner
--- src/mesa/math/m_clip_tmp.h | 20 ++--- src/mesa/math/m_matrix.c | 70 +++--- src/mesa/math/m_norm_tmp.h | 2 +- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/mesa/math/m_clip_tmp.h b/src/mesa/math/m_clip_tmp.h index e289