mesa: Remove no-op wrappers around trig functions.
This commit is contained in:
parent
fef303bc94
commit
165694ad65
|
@ -243,41 +243,6 @@ _mesa_memset16( unsigned short *dst, unsigned short val, size_t n )
|
|||
/** \name Math */
|
||||
/*@{*/
|
||||
|
||||
/** Wrapper around sin() */
|
||||
double
|
||||
_mesa_sin(double a)
|
||||
{
|
||||
return sin(a);
|
||||
}
|
||||
|
||||
/** Single precision wrapper around sin() */
|
||||
float
|
||||
_mesa_sinf(float a)
|
||||
{
|
||||
return (float) sin((double) a);
|
||||
}
|
||||
|
||||
/** Wrapper around cos() */
|
||||
double
|
||||
_mesa_cos(double a)
|
||||
{
|
||||
return cos(a);
|
||||
}
|
||||
|
||||
/** Single precision wrapper around asin() */
|
||||
float
|
||||
_mesa_asinf(float x)
|
||||
{
|
||||
return (float) asin((double) x);
|
||||
}
|
||||
|
||||
/** Single precision wrapper around atan() */
|
||||
float
|
||||
_mesa_atanf(float x)
|
||||
{
|
||||
return (float) atan((double) x);
|
||||
}
|
||||
|
||||
/** Wrapper around sqrt() */
|
||||
double
|
||||
_mesa_sqrtd(double x)
|
||||
|
|
|
@ -521,21 +521,6 @@ _mesa_realloc( void *oldBuffer, size_t oldSize, size_t newSize );
|
|||
extern void
|
||||
_mesa_memset16( unsigned short *dst, unsigned short val, size_t n );
|
||||
|
||||
extern double
|
||||
_mesa_sin(double a);
|
||||
|
||||
extern float
|
||||
_mesa_sinf(float a);
|
||||
|
||||
extern double
|
||||
_mesa_cos(double a);
|
||||
|
||||
extern float
|
||||
_mesa_asinf(float x);
|
||||
|
||||
extern float
|
||||
_mesa_atanf(float x);
|
||||
|
||||
extern double
|
||||
_mesa_sqrtd(double x);
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ _mesa_light(GLcontext *ctx, GLuint lnum, GLenum pname, const GLfloat *params)
|
|||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_LIGHT);
|
||||
light->SpotCutoff = params[0];
|
||||
light->_CosCutoffNeg = (GLfloat) (_mesa_cos(light->SpotCutoff * DEG2RAD));
|
||||
light->_CosCutoffNeg = (GLfloat) (cos(light->SpotCutoff * DEG2RAD));
|
||||
if (light->_CosCutoffNeg < 0)
|
||||
light->_CosCutoff = 0;
|
||||
else
|
||||
|
|
|
@ -804,8 +804,8 @@ _math_matrix_rotate( GLmatrix *mat,
|
|||
GLfloat m[16];
|
||||
GLboolean optimized;
|
||||
|
||||
s = (GLfloat) _mesa_sin( angle * DEG2RAD );
|
||||
c = (GLfloat) _mesa_cos( angle * DEG2RAD );
|
||||
s = (GLfloat) sin( angle * DEG2RAD );
|
||||
c = (GLfloat) cos( angle * DEG2RAD );
|
||||
|
||||
memcpy(m, Identity, sizeof(GLfloat)*16);
|
||||
optimized = GL_FALSE;
|
||||
|
|
|
@ -762,7 +762,7 @@ _mesa_execute_program(GLcontext * ctx,
|
|||
GLfloat a[4], result[4];
|
||||
fetch_vector1(&inst->SrcReg[0], machine, a);
|
||||
result[0] = result[1] = result[2] = result[3]
|
||||
= (GLfloat) _mesa_cos(a[0]);
|
||||
= (GLfloat) cos(a[0]);
|
||||
store_vector4(inst, machine, result);
|
||||
}
|
||||
break;
|
||||
|
@ -1393,8 +1393,8 @@ _mesa_execute_program(GLcontext * ctx,
|
|||
{
|
||||
GLfloat a[4], result[4];
|
||||
fetch_vector1(&inst->SrcReg[0], machine, a);
|
||||
result[0] = (GLfloat) _mesa_cos(a[0]);
|
||||
result[1] = (GLfloat) _mesa_sin(a[0]);
|
||||
result[0] = (GLfloat) cos(a[0]);
|
||||
result[1] = (GLfloat) sin(a[0]);
|
||||
result[2] = 0.0; /* undefined! */
|
||||
result[3] = 0.0; /* undefined! */
|
||||
store_vector4(inst, machine, result);
|
||||
|
@ -1465,7 +1465,7 @@ _mesa_execute_program(GLcontext * ctx,
|
|||
GLfloat a[4], result[4];
|
||||
fetch_vector1(&inst->SrcReg[0], machine, a);
|
||||
result[0] = result[1] = result[2] = result[3]
|
||||
= (GLfloat) _mesa_sin(a[0]);
|
||||
= (GLfloat) sin(a[0]);
|
||||
store_vector4(inst, machine, result);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue