Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5564 | serge | 1 | |
2 | * Mesa 3-D graphics library |
||
3 | * |
||
4 | * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. |
||
5 | * |
||
6 | * Permission is hereby granted, free of charge, to any person obtaining a |
||
7 | * copy of this software and associated documentation files (the "Software"), |
||
8 | * to deal in the Software without restriction, including without limitation |
||
9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||
10 | * and/or sell copies of the Software, and to permit persons to whom the |
||
11 | * Software is furnished to do so, subject to the following conditions: |
||
12 | * |
||
13 | * The above copyright notice and this permission notice shall be included |
||
14 | * in all copies or substantial portions of the Software. |
||
15 | * |
||
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
||
17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
||
20 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
||
21 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||
22 | * OTHER DEALINGS IN THE SOFTWARE. |
||
23 | */ |
||
24 | |||
25 | |||
26 | * Intel x86 assembly code by Josh Vanderhoof |
||
27 | */ |
||
28 | |||
29 | |||
30 | #include "main/context.h" |
||
31 | #include "math/m_xform.h" |
||
32 | |||
33 | |||
34 | #include "common_x86_asm.h" |
||
35 | |||
36 | |||
37 | #ifdef USE_3DNOW_ASM |
||
38 | #include "3dnow.h" |
||
39 | #endif |
||
40 | #ifdef USE_SSE_ASM |
||
41 | #include "sse.h" |
||
42 | #endif |
||
43 | #endif |
||
44 | |||
45 | |||
46 | #include "math/m_debug.h" |
||
47 | #endif |
||
48 | |||
49 | |||
50 | |||
51 | DECLARE_XFORM_GROUP( x86, 2 ) |
||
52 | DECLARE_XFORM_GROUP( x86, 3 ) |
||
53 | DECLARE_XFORM_GROUP( x86, 4 ) |
||
54 | |||
55 | |||
56 | |||
57 | _mesa_x86_cliptest_points4( GLvector4f *clip_vec, |
||
58 | GLvector4f *proj_vec, |
||
59 | GLubyte clipMask[], |
||
60 | GLubyte *orMask, |
||
61 | GLubyte *andMask, |
||
62 | GLboolean viewport_z_clip ); |
||
63 | |||
64 | |||
65 | _mesa_x86_cliptest_points4_np( GLvector4f *clip_vec, |
||
66 | GLvector4f *proj_vec, |
||
67 | GLubyte clipMask[], |
||
68 | GLubyte *orMask, |
||
69 | GLubyte *andMask, |
||
70 | GLboolean viewport_z_clip ); |
||
71 | |||
72 | |||
73 | _mesa_v16_x86_cliptest_points4( GLfloat *first_vert, |
||
74 | GLfloat *last_vert, |
||
75 | GLubyte *or_mask, |
||
76 | GLubyte *and_mask, |
||
77 | GLubyte *clip_mask, |
||
78 | GLboolean viewport_z_clip ); |
||
79 | |||
80 | |||
81 | _mesa_v16_x86_general_xform( GLfloat *dest, |
||
82 | const GLfloat *m, |
||
83 | const GLfloat *src, |
||
84 | GLuint src_stride, |
||
85 | GLuint count ); |
||
86 | #endif |
||
87 | |||
88 | |||
89 | |||
90 | static void _mesa_init_x86_transform_asm( void ) |
||
91 | { |
||
92 | ASSIGN_XFORM_GROUP( x86, 2 ); |
||
93 | ASSIGN_XFORM_GROUP( x86, 3 ); |
||
94 | ASSIGN_XFORM_GROUP( x86, 4 ); |
||
95 | |||
96 | |||
97 | _mesa_clip_np_tab[4] = _mesa_x86_cliptest_points4_np; |
||
98 | |||
99 | |||
100 | _math_test_all_transform_functions( "x86" ); |
||
101 | _math_test_all_cliptest_functions( "x86" ); |
||
102 | #endif |
||
103 | } |
||
104 | #endif |
||
105 | |||
106 | |||
107 | |||
108 | { |
||
109 | _mesa_get_x86_features(); |
||
110 | |||
111 | |||
112 | if ( _mesa_x86_cpu_features ) { |
||
113 | _mesa_init_x86_transform_asm(); |
||
114 | } |
||
115 | |||
116 | |||
117 | _mesa_init_3dnow_transform_asm(); |
||
118 | } |
||
119 | |||
120 | |||
121 | _mesa_init_sse_transform_asm(); |
||
122 | } |
||
123 | |||
124 | |||
125 | } |
||
126 |