3 * Mesa 3-D graphics library
6 * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
15 * The above copyright notice and this permission notice shall be included
16 * in all copies or substantial portions of the Software.
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 * Keith Whitwell <keith@tungstengraphics.com>
29 static void copy_pv_rgba4_spec5( struct gl_context
*ctx
, GLuint edst
, GLuint esrc
)
31 i810ContextPtr imesa
= I810_CONTEXT( ctx
);
32 GLubyte
*i810verts
= (GLubyte
*)imesa
->verts
;
33 GLuint shift
= imesa
->vertex_stride_shift
;
34 i810Vertex
*dst
= (i810Vertex
*)(i810verts
+ (edst
<< shift
));
35 i810Vertex
*src
= (i810Vertex
*)(i810verts
+ (esrc
<< shift
));
36 dst
->ui
[4] = src
->ui
[4];
37 dst
->ui
[5] = src
->ui
[5];
40 static void copy_pv_rgba4( struct gl_context
*ctx
, GLuint edst
, GLuint esrc
)
42 i810ContextPtr imesa
= I810_CONTEXT( ctx
);
43 GLubyte
*i810verts
= (GLubyte
*)imesa
->verts
;
44 GLuint shift
= imesa
->vertex_stride_shift
;
45 i810Vertex
*dst
= (i810Vertex
*)(i810verts
+ (edst
<< shift
));
46 i810Vertex
*src
= (i810Vertex
*)(i810verts
+ (esrc
<< shift
));
47 dst
->ui
[4] = src
->ui
[4];
50 static void copy_pv_rgba3( struct gl_context
*ctx
, GLuint edst
, GLuint esrc
)
52 i810ContextPtr imesa
= I810_CONTEXT( ctx
);
53 GLubyte
*i810verts
= (GLubyte
*)imesa
->verts
;
54 GLuint shift
= imesa
->vertex_stride_shift
;
55 i810Vertex
*dst
= (i810Vertex
*)(i810verts
+ (edst
<< shift
));
56 i810Vertex
*src
= (i810Vertex
*)(i810verts
+ (esrc
<< shift
));
57 dst
->ui
[3] = src
->ui
[3];