Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4358 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
 * New (3.1) transformation code written by Keith Whitwell.
27
 */
28
29
 
30
 
31
static void TAG2(copy, BITS)( GLvector4f *to, const GLvector4f *f )	\
32
{									\
33
   GLfloat (*t)[4] = (GLfloat (*)[4])to->start;				\
34
   GLfloat *from = f->start;						\
35
   GLuint stride = f->stride;				        	\
36
   GLuint count = to->count;						\
37
   GLuint i;								\
38
									\
39
   if (BITS)								\
40
      STRIDE_LOOP {							\
41
	 if (BITS&1) t[i][0] = from[0];					\
42
	 if (BITS&2) t[i][1] = from[1];					\
43
	 if (BITS&4) t[i][2] = from[2];					\
44
	 if (BITS&8) t[i][3] = from[3];					\
45
      }									\
46
}
47
48
 
49
 */
50
COPY_FUNC( 0x0 )		/* noop */
51
COPY_FUNC( 0x1 )
52
COPY_FUNC( 0x2 )
53
COPY_FUNC( 0x3 )
54
COPY_FUNC( 0x4 )
55
COPY_FUNC( 0x5 )
56
COPY_FUNC( 0x6 )
57
COPY_FUNC( 0x7 )
58
COPY_FUNC( 0x8 )
59
COPY_FUNC( 0x9 )
60
COPY_FUNC( 0xa )
61
COPY_FUNC( 0xb )
62
COPY_FUNC( 0xc )
63
COPY_FUNC( 0xd )
64
COPY_FUNC( 0xe )
65
COPY_FUNC( 0xf )
66
67
 
68
{
69
   _mesa_copy_tab[0x0] = TAG2(copy, 0x0);
70
   _mesa_copy_tab[0x1] = TAG2(copy, 0x1);
71
   _mesa_copy_tab[0x2] = TAG2(copy, 0x2);
72
   _mesa_copy_tab[0x3] = TAG2(copy, 0x3);
73
   _mesa_copy_tab[0x4] = TAG2(copy, 0x4);
74
   _mesa_copy_tab[0x5] = TAG2(copy, 0x5);
75
   _mesa_copy_tab[0x6] = TAG2(copy, 0x6);
76
   _mesa_copy_tab[0x7] = TAG2(copy, 0x7);
77
   _mesa_copy_tab[0x8] = TAG2(copy, 0x8);
78
   _mesa_copy_tab[0x9] = TAG2(copy, 0x9);
79
   _mesa_copy_tab[0xa] = TAG2(copy, 0xa);
80
   _mesa_copy_tab[0xb] = TAG2(copy, 0xb);
81
   _mesa_copy_tab[0xc] = TAG2(copy, 0xc);
82
   _mesa_copy_tab[0xd] = TAG2(copy, 0xd);
83
   _mesa_copy_tab[0xe] = TAG2(copy, 0xe);
84
   _mesa_copy_tab[0xf] = TAG2(copy, 0xf);
85
}
86