Remove all the radeon_subset files. They were completely unused. Keith
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_vtxfmt.h
1 /* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt.h,v 1.3 2002/12/21 17:02:16 dawes Exp $ */
2 /**************************************************************************
3
4 Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and
5 Tungsten Graphics Inc., Cedar Park, 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 #ifndef __RADEON_VTXFMT_H__
37 #define __RADEON_VTXFMT_H__
38
39 #include "radeon_context.h"
40
41
42 extern void radeonVtxfmtUpdate( GLcontext *ctx );
43 extern void radeonVtxfmtInit( GLcontext *ctx, GLboolean useCodegen );
44 extern void radeonVtxfmtInvalidate( GLcontext *ctx );
45 extern void radeonVtxfmtDestroy( GLcontext *ctx );
46 extern void radeonVtxfmtInitChoosers( GLvertexformat *vfmt );
47
48 extern void radeonVtxfmtMakeCurrent( GLcontext *ctx );
49 extern void radeonVtxfmtUnbindContext( GLcontext *ctx );
50
51 extern void radeon_copy_to_current( GLcontext *ctx );
52
53 #define DFN( FUNC, CACHE) \
54 do { \
55 char *start = (char *)&FUNC; \
56 char *end = (char *)&FUNC##_end; \
57 insert_at_head( &CACHE, dfn ); \
58 dfn->key = key; \
59 dfn->code = ALIGN_MALLOC( end - start, 16 ); \
60 memcpy (dfn->code, start, end - start); \
61 } \
62 while ( 0 )
63
64 #define FIXUP( CODE, OFFSET, CHECKVAL, NEWVAL ) \
65 do { \
66 int *icode = (int *)(CODE+OFFSET); \
67 assert (*icode == CHECKVAL); \
68 *icode = (int)NEWVAL; \
69 } while (0)
70
71
72 /* Useful for figuring out the offsets:
73 */
74 #define FIXUP2( CODE, OFFSET, CHECKVAL, NEWVAL ) \
75 do { \
76 while (*(int *)(CODE+OFFSET) != CHECKVAL) OFFSET++; \
77 fprintf(stderr, "%s/%d CVAL %x OFFSET %d VAL %x\n", __FUNCTION__, \
78 __LINE__, CHECKVAL, OFFSET, (int)(NEWVAL)); \
79 *(int *)(CODE+OFFSET) = (int)(NEWVAL); \
80 OFFSET += 4; \
81 } while (0)
82
83 /*
84 */
85 void radeonInitCodegen( struct dfn_generators *gen, GLboolean useCodegen );
86 void radeonInitX86Codegen( struct dfn_generators *gen );
87 void radeonInitSSECodegen( struct dfn_generators *gen );
88
89
90
91 /* Defined in radeon_vtxfmt_x86.c
92 */
93 struct dynfn *radeon_makeX86Vertex2f( GLcontext *, int );
94 struct dynfn *radeon_makeX86Vertex2fv( GLcontext *, int );
95 struct dynfn *radeon_makeX86Vertex3f( GLcontext *, int );
96 struct dynfn *radeon_makeX86Vertex3fv( GLcontext *, int );
97 struct dynfn *radeon_makeX86Color4ub( GLcontext *, int );
98 struct dynfn *radeon_makeX86Color4ubv( GLcontext *, int );
99 struct dynfn *radeon_makeX86Color3ub( GLcontext *, int );
100 struct dynfn *radeon_makeX86Color3ubv( GLcontext *, int );
101 struct dynfn *radeon_makeX86Color4f( GLcontext *, int );
102 struct dynfn *radeon_makeX86Color4fv( GLcontext *, int );
103 struct dynfn *radeon_makeX86Color3f( GLcontext *, int );
104 struct dynfn *radeon_makeX86Color3fv( GLcontext *, int );
105 struct dynfn *radeon_makeX86SecondaryColor3ubEXT( GLcontext *, int );
106 struct dynfn *radeon_makeX86SecondaryColor3ubvEXT( GLcontext *, int );
107 struct dynfn *radeon_makeX86SecondaryColor3fEXT( GLcontext *, int );
108 struct dynfn *radeon_makeX86SecondaryColor3fvEXT( GLcontext *, int );
109 struct dynfn *radeon_makeX86Normal3f( GLcontext *, int );
110 struct dynfn *radeon_makeX86Normal3fv( GLcontext *, int );
111 struct dynfn *radeon_makeX86TexCoord2f( GLcontext *, int );
112 struct dynfn *radeon_makeX86TexCoord2fv( GLcontext *, int );
113 struct dynfn *radeon_makeX86TexCoord1f( GLcontext *, int );
114 struct dynfn *radeon_makeX86TexCoord1fv( GLcontext *, int );
115 struct dynfn *radeon_makeX86MultiTexCoord2fARB( GLcontext *, int );
116 struct dynfn *radeon_makeX86MultiTexCoord2fvARB( GLcontext *, int );
117 struct dynfn *radeon_makeX86MultiTexCoord1fARB( GLcontext *, int );
118 struct dynfn *radeon_makeX86MultiTexCoord1fvARB( GLcontext *, int );
119
120 #endif