/*
* Mesa 3-D graphics library
- * Version: 5.1
*
* Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* Gareth Hughes
*/
+#include "c99_math.h"
#include "main/glheader.h"
#include "main/context.h"
#include "main/macros.h"
/* Hmmm, don't know how we could test the precalculated
* length case...
*/
- scale = INV_SQRTF( len );
+ scale = 1.0f / sqrtf(len);
SCALE_SCALAR_3V( out[i], scale, t );
} else {
out[i][0] = out[i][1] = out[i][2] = 0;
(void) cycles;
- mat->m = (GLfloat *) _mesa_align_malloc( 16 * sizeof(GLfloat), 16 );
+ mat->m = _mesa_align_malloc( 16 * sizeof(GLfloat), 16 );
mat->inv = m = mat->m;
init_matrix( m );
ASSIGN_3V( d2[i], 0.0, 0.0, 0.0 );
for ( j = 0 ; j < 3 ; j++ )
s[i][j] = rnd();
- length[i] = INV_SQRTF( LEN_SQUARED_3FV( s[i] ) );
+ length[i] = 1.0f / sqrtf( LEN_SQUARED_3FV( s[i] ) );
}
source->data = (GLfloat(*)[4]) s;
if ( first_time ) {
first_time = 0;
- mesa_profile = _mesa_getenv( "MESA_PROFILE" );
+ mesa_profile = getenv( "MESA_PROFILE" );
}
#ifdef RUN_DEBUG_BENCHMARK