diff options
author | Gareth Hughes <gareth@valinux.com> | 2000-10-23 00:16:28 +0000 |
---|---|---|
committer | Gareth Hughes <gareth@valinux.com> | 2000-10-23 00:16:28 +0000 |
commit | fc2427e81b1c648550d0368652d6a475df785027 (patch) | |
tree | 92da699f07610ef4dc07ae4e0add4693c192040d /src/mesa/x86/3dnow.h | |
parent | e188b6e1f1d1e5e72985fdc3d69d26eeab26e987 (diff) |
Major audit of all Mesa's x86 assembly code. This round is basically
general cleanups - more to come.
Added P6 architecture timing to debug_xform routines. Still need to add
test_all_vertex_functions test for the v16 asm. Dynamic reconfiguration
of counter overhead for more accurate benchmarking.
Diffstat (limited to 'src/mesa/x86/3dnow.h')
-rw-r--r-- | src/mesa/x86/3dnow.h | 75 |
1 files changed, 10 insertions, 65 deletions
diff --git a/src/mesa/x86/3dnow.h b/src/mesa/x86/3dnow.h index b06cc5b288..1e17cc4bb4 100644 --- a/src/mesa/x86/3dnow.h +++ b/src/mesa/x86/3dnow.h @@ -1,21 +1,21 @@ -/* $Id: 3dnow.h,v 1.1 1999/08/19 00:55:42 jtg Exp $ */ +/* $Id: 3dnow.h,v 1.2 2000/10/23 00:16:28 gareth Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.1 - * + * Version: 3.5 + * * Copyright (C) 1999 Brian Paul All Rights Reserved. - * + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. - * + * * 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 @@ -24,72 +24,17 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - /* * 3DNow! optimizations contributed by * Holger Waechtler <holger@akaflieg.extern.tu-berlin.de> */ - -#ifndef _3dnow_h -#define _3dnow_h - - +#ifndef __3DNOW_H__ +#define __3DNOW_H__ #include "xform.h" - -void gl_init_3dnow_asm_transforms (void); - - - - -#if 0 -GLvector4f *gl_project_points( GLvector4f *proj_vec, - const GLvector4f *clip_vec ) -{ - __asm__ ( - " femms \n" - " \n" - " movq (%0), %%mm0 # x1 | x0 \n" - " movq 8(%0), %%mm1 # oow | x2 \n" - " \n" - "1: movq %%mm1, %%mm2 # oow | x2 \n" - " addl %2, %0 # next point \n" - " \n" - " punpckhdq %%mm2, %%mm2 # oow | oow \n" - " addl $16, %1 # next point \n" - " \n" - " pfrcp %%mm2, %%mm3 # 1/oow | 1/oow \n" - " decl %3 \n" - " \n" - " pfmul %%mm3, %%mm0 # x1/oow | x0/oow \n" - " movq %%mm0, -16(%1) # write r0, r1 \n" - " \n" - " pfmul %%mm3, %%mm1 # 1 | x2/oow \n" - " movq (%0), %%mm0 # x1 | x0 \n" - " \n" - " movd %%mm1, 8(%1) # write r2 \n" - " movd %%mm3, 12(%1) # write r3 \n" - " \n" - " movq 8(%0), %%mm1 # oow | x2 \n" - " ja 1b \n" - " \n" - " femms \n" - " " - ::"a" (clip_vec->start), - "c" (proj_vec->start), - "g" (clip_vec->stride), - "d" (clip_vec->count) - ); - - proj_vec->flags |= VEC_SIZE_4; - proj_vec->size = 3; - proj_vec->count = clip_vec->count; - return proj_vec; -} -#endif - - +void gl_init_3dnow_transform_asm( void ); +void gl_init_3dnow_vertex_asm( void ); #endif |