patch to import Jon Smirl's work from Bitkeeper
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_tcl.h
1 /* $XFree86$ */
2 /**************************************************************************
3
4 Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and
5 Tungsten Grahpics Inc., Austin, Texas.
6
7 All Rights Reserved.
8
9 Permission is hereby granted, free of charge, to any person obtaining
10 a copy of this software and associated documentation files (the
11 "Software"), to deal in the Software without restriction, including
12 without limitation the rights to use, copy, modify, merge, publish,
13 distribute, sublicense, and/or sell copies of the Software, and to
14 permit persons to whom the Software is furnished to do so, subject to
15 the following conditions:
16
17 The above copyright notice and this permission notice (including the
18 next paragraph) shall be included in all copies or substantial
19 portions of the Software.
20
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
25 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
29 **************************************************************************/
30
31 /*
32 * Authors:
33 * Keith Whitwell <keith@tungstengraphics.com>
34 *
35 */
36
37 #ifndef __RADEON_TCL_H__
38 #define __RADEON_TCL_H__
39
40 #ifdef GLX_DIRECT_RENDERING
41
42 #include "radeon_context.h"
43
44 extern void radeonTclPrimitive( GLcontext *ctx, GLenum prim, int hw_prim );
45 extern void radeonEmitEltPrimitive( GLcontext *ctx, GLuint first, GLuint last,
46 GLuint flags );
47 extern void radeonEmitPrimitive( GLcontext *ctx, GLuint first, GLuint last,
48 GLuint flags );
49
50 extern void radeonTclFallback( GLcontext *ctx, GLuint bit, GLboolean mode );
51
52 #define RADEON_TCL_FALLBACK_RASTER 0x1 /* rasterization */
53 #define RADEON_TCL_FALLBACK_UNFILLED 0x2 /* unfilled tris */
54 #define RADEON_TCL_FALLBACK_LIGHT_TWOSIDE 0x4 /* twoside tris */
55 #define RADEON_TCL_FALLBACK_MATERIAL 0x8 /* material in vb */
56 #define RADEON_TCL_FALLBACK_TEXGEN_0 0x10 /* texgen, unit 0 */
57 #define RADEON_TCL_FALLBACK_TEXGEN_1 0x20 /* texgen, unit 1 */
58 #define RADEON_TCL_FALLBACK_TEXGEN_2 0x40 /* texgen, unit 2 */
59 #define RADEON_TCL_FALLBACK_TCL_DISABLE 0x80 /* user disable */
60 #define RADEON_TCL_FALLBACK_TEXRECT_0 0x100 /* texture rectangle */
61 #define RADEON_TCL_FALLBACK_TEXRECT_1 0x200 /* texture rectangle */
62 #define RADEON_TCL_FALLBACK_TEXRECT_2 0x400 /* texture rectangle */
63
64 #define RADEON_MAX_TCL_VERTSIZE (15*4)
65
66 #define TCL_FALLBACK( ctx, bit, mode ) radeonTclFallback( ctx, bit, mode )
67
68
69 #endif
70 #endif