Fixed off by one errors in clipping.
[mesa.git] / src / mesa / drivers / dri / unichrome / via_vb.h
1 /*
2 * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
3 * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sub license,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial portions
14 * of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
19 * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS 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 OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25 #ifndef _VIAVB_H
26 #define _VIAVB_H
27
28 #include "mtypes.h"
29 #include "swrast/swrast.h"
30
31 #define VIA_TEX1_BIT 0x0001
32 #define VIA_TEX0_BIT 0x0002
33 #define VIA_RGBA_BIT 0x0004
34 #define VIA_SPEC_BIT 0x0008
35 #define VIA_FOG_BIT 0x0010
36 #define VIA_XYZW_BIT 0x0020
37 #define VIA_PTEX_BIT 0x0040
38 #define VIA_MAX_SETUP 0x0080
39
40 #define _VIA_NEW_VERTEX (_NEW_TEXTURE | \
41 _DD_NEW_SEPARATE_SPECULAR | \
42 _DD_NEW_TRI_UNFILLED | \
43 _DD_NEW_TRI_LIGHT_TWOSIDE | \
44 _NEW_FOG)
45
46
47 extern void viaChooseVertexState(GLcontext *ctx);
48 extern void viaCheckTexSizes(GLcontext *ctx);
49 extern void viaBuildVertices(GLcontext *ctx,
50 GLuint start,
51 GLuint count,
52 GLuint newinputs);
53
54
55 extern void via_emit_contiguous_verts(GLcontext *ctx,
56 GLuint start,
57 GLuint count);
58
59 extern void via_translate_vertex(GLcontext *ctx,
60 const viaVertex *src,
61 SWvertex *dst);
62
63 extern void viaInitVB(GLcontext *ctx);
64 extern void viaFreeVB(GLcontext *ctx);
65
66 extern void via_print_vertex(GLcontext *ctx, const viaVertex *v);
67 extern void viaPrintSetupFlags(char *msg, GLuint flags);
68
69 #endif