Subversion Repositories shark

Rev

Rev 134 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
134 giacomo 1
/* $Id: x86.c,v 1.2 2003-04-24 13:36:03 giacomo Exp $ */
70 giacomo 2
 
3
/*
4
 * Mesa 3-D graphics library
5
 * Version:  3.5
6
 *
7
 * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
8
 *
9
 * Permission is hereby granted, free of charge, to any person obtaining a
10
 * copy of this software and associated documentation files (the "Software"),
11
 * to deal in the Software without restriction, including without limitation
12
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13
 * and/or sell copies of the Software, and to permit persons to whom the
14
 * Software is furnished to do so, subject to the following conditions:
15
 *
16
 * The above copyright notice and this permission notice shall be included
17
 * in all copies or substantial portions of the Software.
18
 *
19
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
22
 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23
 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
 */
26
 
27
/*
28
 * Intel x86 assembly code by Josh Vanderhoof
29
 */
30
 
31
#include "glheader.h"
32
#include "context.h"
33
#include "math/m_xform.h"
34
#include "tnl/t_context.h"
35
 
36
#include "x86.h"
134 giacomo 37
#include "macros_common_x86.h"
70 giacomo 38
 
39
#ifdef DEBUG
40
#include "math/m_debug.h"
41
#endif
42
 
43
 
44
#ifdef USE_X86_ASM
45
DECLARE_XFORM_GROUP( x86, 2 )
46
DECLARE_XFORM_GROUP( x86, 3 )
47
DECLARE_XFORM_GROUP( x86, 4 )
48
 
49
 
50
extern GLvector4f * _ASMAPI
51
_mesa_x86_cliptest_points4( GLvector4f *clip_vec,
52
                            GLvector4f *proj_vec,
53
                            GLubyte clipMask[],
54
                            GLubyte *orMask,
55
                            GLubyte *andMask );
56
 
57
extern GLvector4f * _ASMAPI
58
_mesa_x86_cliptest_points4_np( GLvector4f *clip_vec,
59
                               GLvector4f *proj_vec,
60
                               GLubyte clipMask[],
61
                               GLubyte *orMask,
62
                               GLubyte *andMask );
63
 
64
extern void _ASMAPI
65
_mesa_v16_x86_cliptest_points4( GLfloat *first_vert,
66
                                GLfloat *last_vert,
67
                                GLubyte *or_mask,
68
                                GLubyte *and_mask,
69
                                GLubyte *clip_mask );
70
 
71
extern void _ASMAPI
72
_mesa_v16_x86_general_xform( GLfloat *dest,
73
                             const GLfloat *m,
74
                             const GLfloat *src,
75
                             GLuint src_stride,
76
                             GLuint count );
77
#endif
78
 
79
 
80
void _mesa_init_x86_transform_asm( void )
81
{
82
#ifdef USE_X86_ASM
83
   ASSIGN_XFORM_GROUP( x86, 2 );
84
   ASSIGN_XFORM_GROUP( x86, 3 );
85
   ASSIGN_XFORM_GROUP( x86, 4 );
86
 
87
   _mesa_clip_tab[4] = _mesa_x86_cliptest_points4;
88
   _mesa_clip_np_tab[4] = _mesa_x86_cliptest_points4_np;
89
 
90
#ifdef DEBUG
91
   _math_test_all_transform_functions( "x86" );
92
   _math_test_all_cliptest_functions( "x86" );
93
#endif
94
#endif
95
}
96