Tizen 2.0 Release
[profile/ivi/osmesa.git] / src / mesa / drivers / dri / tdfx / tdfx_vb.h
1 /*
2  * GLX Hardware Device Driver for Intel tdfx
3  * Copyright (C) 1999 Keith Whitwell
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, sublicense,
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 shall be included
13  * in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18  * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, 
19  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
20  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 
21  * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22  *
23  *
24  */
25
26 #ifndef TDFXVB_INC
27 #define TDFXVB_INC
28
29 #include "main/mtypes.h"
30
31 #include "tnl/tnl.h"
32 #include "tnl/t_context.h"
33 #include "math/m_xform.h"
34
35 #define TDFX_XYZ_BIT        0x1
36 #define TDFX_W_BIT          0x2
37 #define TDFX_RGBA_BIT       0x4
38 #define TDFX_TEX1_BIT       0x8
39 #define TDFX_TEX0_BIT       0x10        
40 #define TDFX_PTEX_BIT       0x20
41 #define TDFX_FOGC_BIT       0x40
42 #define TDFX_MAX_SETUP      0x80
43
44 #define _TDFX_NEW_RASTERSETUP (_NEW_TEXTURE |                   \
45                                _DD_NEW_SEPARATE_SPECULAR |      \
46                                _DD_NEW_TRI_UNFILLED |           \
47                                _DD_NEW_TRI_LIGHT_TWOSIDE |      \
48                                _NEW_FOG)
49
50
51 extern void tdfxValidateBuildProjVerts(struct gl_context *ctx,
52                                        GLuint start, GLuint count,
53                                        GLuint newinputs );
54
55 extern void tdfxPrintSetupFlags(char *msg, GLuint flags );
56
57 extern void tdfxInitVB( struct gl_context *ctx );
58
59 extern void tdfxFreeVB( struct gl_context *ctx );
60
61 extern void tdfxCheckTexSizes( struct gl_context *ctx );
62
63 extern void tdfxChooseVertexState( struct gl_context *ctx );
64
65 extern void tdfxBuildVertices( struct gl_context *ctx, GLuint start, GLuint end,
66                                GLuint newinputs );
67
68 #endif