}
else {
double x = (double) value / (double) max;
- return IROUND_POS((GLfloat) max * _mesa_pow(x, 1.0F/gamma));
+ return IROUND_POS((GLfloat) max * pow(x, 1.0F/gamma));
}
}
g = 1.0 / v->RedGamma;
for (i=0; i<256; i++) {
- GLint red = IROUND_POS(255.0 * _mesa_pow( hpcr_rgbTbl[0][i]/255.0, g ));
+ GLint red = IROUND_POS(255.0 * pow( hpcr_rgbTbl[0][i]/255.0, g ));
v->hpcr_rgbTbl[0][i] = CLAMP( red, 16, 239 );
}
g = 1.0 / v->GreenGamma;
for (i=0; i<256; i++) {
- GLint green = IROUND_POS(255.0 * _mesa_pow( hpcr_rgbTbl[1][i]/255.0, g ));
+ GLint green = IROUND_POS(255.0 * pow( hpcr_rgbTbl[1][i]/255.0, g ));
v->hpcr_rgbTbl[1][i] = CLAMP( green, 16, 239 );
}
g = 1.0 / v->BlueGamma;
for (i=0; i<256; i++) {
- GLint blue = IROUND_POS(255.0 * _mesa_pow( hpcr_rgbTbl[2][i]/255.0, g ));
+ GLint blue = IROUND_POS(255.0 * pow( hpcr_rgbTbl[2][i]/255.0, g ));
v->hpcr_rgbTbl[2][i] = CLAMP( blue, 32, 223 );
}
v->undithered_pf = PF_HPCR; /* can't really disable dithering for now */
#endif
}
-
-/** Wrapper around pow() */
-double
-_mesa_pow(double x, double y)
-{
- return pow(x, y);
-}
-
-
/**
* Find the first bit set in a word.
*/
extern void
_mesa_init_sqrt_table(void);
-extern double
-_mesa_pow(double x, double y);
-
extern int
_mesa_ffs(int32_t i);
for (i = EXP_TABLE_SIZE - 1; i > 0 ;i--) {
if (clamp == 0) {
- tmp = _mesa_pow(i / (GLdouble) (EXP_TABLE_SIZE - 1), exponent);
+ tmp = pow(i / (GLdouble) (EXP_TABLE_SIZE - 1), exponent);
if (tmp < FLT_MIN * 100.0) {
tmp = 0.0;
clamp = 1;
GLdouble t, x = j / (GLfloat) (SHINE_TABLE_SIZE - 1);
if (x < 0.005) /* underflow check */
x = 0.005;
- t = _mesa_pow(x, shininess);
+ t = pow(x, shininess);
if (t > 1e-20)
m[j] = (GLfloat) t;
else
int k = (int) f; \
if (k < 0 /* gcc may cast an overflow float value to negative int value*/ \
|| k > SHINE_TABLE_SIZE-2) \
- result = (GLfloat) _mesa_pow( dp, _tab->shininess ); \
+ result = (GLfloat) pow( dp, _tab->shininess ); \
else \
result = _tab->tab[k] + (f-k)*(_tab->tab[k+1]-_tab->tab[k]); \
} while (0)
table[i] = cs / 12.92f;
}
else {
- table[i] = (GLfloat) _mesa_pow((cs + 0.055) / 1.055, 2.4);
+ table[i] = (GLfloat) pow((cs + 0.055) / 1.055, 2.4);
}
}
tableReady = GL_TRUE;
table[i] = cs / 12.92f;
}
else {
- table[i] = (GLfloat) _mesa_pow((cs + 0.055) / 1.055, 2.4);
+ table[i] = (GLfloat) pow((cs + 0.055) / 1.055, 2.4);
}
}
tableReady = GL_TRUE;
cs = 12.92f * cl;
}
else {
- cs = (GLfloat)(1.055 * _mesa_pow(cl, 0.41666) - 0.055);
+ cs = (GLfloat)(1.055 * pow(cl, 0.41666) - 0.055);
}
return cs;
}
* result.z = result.x * APPX(result.y)
* We do what the ARB extension says.
*/
- q[2] = (GLfloat) _mesa_pow(2.0, t[0]);
+ q[2] = (GLfloat) pow(2.0, t[0]);
}
q[1] = t[0] - floor_t0;
q[3] = 1.0F;
{
GLfloat a[4], result[4], val;
fetch_vector1(&inst->SrcReg[0], machine, a);
- val = (GLfloat) _mesa_pow(2.0, a[0]);
+ val = (GLfloat) pow(2.0, a[0]);
/*
if (IS_INF_OR_NAN(val))
val = 1.0e10;
if (a[1] == 0.0 && a[3] == 0.0)
result[2] = 1.0F;
else
- result[2] = (GLfloat) _mesa_pow(a[1], a[3]);
+ result[2] = (GLfloat) pow(a[1], a[3]);
}
else {
result[2] = 0.0F;
fetch_vector1(&inst->SrcReg[0], machine, a);
fetch_vector1(&inst->SrcReg[1], machine, b);
result[0] = result[1] = result[2] = result[3]
- = (GLfloat) _mesa_pow(a[0], b[0]);
+ = (GLfloat) pow(a[0], b[0]);
store_vector4(inst, machine, result);
}
break;