Fix several conformance problems. Hack solution to line stipple problem.
[mesa.git] / src / mesa / drivers / glide / fxdrv.h
1
2 /*
3 * Mesa 3-D graphics library
4 * Version: 3.3
5 *
6 * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
7 *
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:
14 *
15 * The above copyright notice and this permission notice shall be included
16 * in all copies or substantial portions of the Software.
17 *
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.
24 *
25 *
26 * Original Mesa / 3Dfx device driver (C) 1999 David Bucciarelli, by the
27 * terms stated above.
28 *
29 * Thank you for your contribution, David!
30 *
31 * Please make note of the above copyright/license statement. If you
32 * contributed code or bug fixes to this code under the previous (GNU
33 * Library) license and object to the new license, your code will be
34 * removed at your request. Please see the Mesa docs/COPYRIGHT file
35 * for more information.
36 *
37 * Additional Mesa/3Dfx driver developers:
38 * Daryll Strauss <daryll@precisioninsight.com>
39 * Keith Whitwell <keith@precisioninsight.com>
40 *
41 * See fxapi.h for more revision/author details.
42 */
43
44
45 #ifndef FXDRV_H
46 #define FXDRV_H
47
48 /* If you comment out this define, a variable takes its place, letting
49 * you turn debugging on/off from the debugger.
50 */
51
52 #include "glheader.h"
53
54
55 #if defined(__linux__)
56 #include <signal.h>
57 #endif
58
59 #include "context.h"
60 #include "macros.h"
61 #include "matrix.h"
62 #include "mem.h"
63 #include "texture.h"
64 #include "mtypes.h"
65
66 #include "GL/fxmesa.h"
67 #include "fxglidew.h"
68
69 #include "math/m_vector.h"
70
71
72 /* Define some shorter names for these things.
73 */
74 #define XCOORD GR_VERTEX_X_OFFSET
75 #define YCOORD GR_VERTEX_Y_OFFSET
76 #define ZCOORD GR_VERTEX_OOZ_OFFSET
77 #define OOWCOORD GR_VERTEX_OOW_OFFSET
78
79 #define RCOORD GR_VERTEX_R_OFFSET
80 #define GCOORD GR_VERTEX_G_OFFSET
81 #define BCOORD GR_VERTEX_B_OFFSET
82 #define ACOORD GR_VERTEX_A_OFFSET
83
84 #define S0COORD GR_VERTEX_SOW_TMU0_OFFSET
85 #define T0COORD GR_VERTEX_TOW_TMU0_OFFSET
86 #define S1COORD GR_VERTEX_SOW_TMU1_OFFSET
87 #define T1COORD GR_VERTEX_TOW_TMU1_OFFSET
88
89
90 extern float gl_ubyte_to_float_255_color_tab[256];
91 #define UBYTE_COLOR_TO_FLOAT_255_COLOR(c) gl_ubyte_to_float_255_color_tab[c]
92 #define UBYTE_COLOR_TO_FLOAT_255_COLOR2(f,c) \
93 (*(int *)&(f)) = ((int *)gl_ubyte_to_float_255_color_tab)[c]
94
95
96
97
98 /* Should have size == 16 * sizeof(float).
99 */
100 typedef union {
101 GrVertex v;
102 GLfloat f[16];
103 GLuint ui[16];
104 } fxVertex;
105
106 /* Used in the fxvtxfmt t&l engine.
107 */
108 typedef struct {
109 GrVertex v;
110 GLfloat clip[4];
111 GLfloat texcoord[2][2];
112 GLubyte mask;
113 GLfloat normal[3]; /* for replay & fallback */
114 } fxClipVertex;
115
116
117
118 typedef void (*vfmt_project_func)( GLcontext *ctx, fxClipVertex *v );
119 typedef void (*vfmt_interpolate_func)( GLfloat t,
120 fxClipVertex *O,
121 const fxClipVertex *I,
122 const fxClipVertex *J );
123
124
125
126 #if defined(FXMESA_USE_ARGB)
127 #define FXCOLOR4( c ) ( \
128 ( ((unsigned int)(c[3]))<<24 ) | \
129 ( ((unsigned int)(c[0]))<<16 ) | \
130 ( ((unsigned int)(c[1]))<<8 ) | \
131 ( (unsigned int)(c[2])) )
132
133 #else
134 #ifdef __i386__
135 #define FXCOLOR4( c ) (* (int *)c)
136 #else
137 #define FXCOLOR4( c ) ( \
138 ( ((unsigned int)(c[3]))<<24 ) | \
139 ( ((unsigned int)(c[2]))<<16 ) | \
140 ( ((unsigned int)(c[1]))<<8 ) | \
141 ( (unsigned int)(c[0])) )
142 #endif
143 #endif
144
145
146
147 /* fastpath/vtxfmt flags first
148 */
149 #define SETUP_TMU0 0x1
150 #define SETUP_TMU1 0x2
151 #define SETUP_RGBA 0x4
152 #define SETUP_SNAP 0x8
153 #define SETUP_XYZW 0x10
154 #define MAX_SETUP 0x20
155
156
157 #define FX_NUM_TMU 2
158
159 #define FX_TMU0 GR_TMU0
160 #define FX_TMU1 GR_TMU1
161 #define FX_TMU_SPLIT 98
162 #define FX_TMU_BOTH 99
163 #define FX_TMU_NONE 100
164
165 /* Used for fxMesa->lastUnitsMode */
166
167 #define FX_UM_NONE 0x00000000
168
169 #define FX_UM_E0_REPLACE 0x00000001
170 #define FX_UM_E0_MODULATE 0x00000002
171 #define FX_UM_E0_DECAL 0x00000004
172 #define FX_UM_E0_BLEND 0x00000008
173 #define FX_UM_E0_ADD 0x00000010
174
175 #define FX_UM_E1_REPLACE 0x00000020
176 #define FX_UM_E1_MODULATE 0x00000040
177 #define FX_UM_E1_DECAL 0x00000080
178 #define FX_UM_E1_BLEND 0x00000100
179 #define FX_UM_E1_ADD 0x00000200
180
181 #define FX_UM_E_ENVMODE 0x000003ff
182
183 #define FX_UM_E0_ALPHA 0x00001000
184 #define FX_UM_E0_LUMINANCE 0x00002000
185 #define FX_UM_E0_LUMINANCE_ALPHA 0x00004000
186 #define FX_UM_E0_INTENSITY 0x00008000
187 #define FX_UM_E0_RGB 0x00010000
188 #define FX_UM_E0_RGBA 0x00020000
189
190 #define FX_UM_E1_ALPHA 0x00040000
191 #define FX_UM_E1_LUMINANCE 0x00080000
192 #define FX_UM_E1_LUMINANCE_ALPHA 0x00100000
193 #define FX_UM_E1_INTENSITY 0x00200000
194 #define FX_UM_E1_RGB 0x00400000
195 #define FX_UM_E1_RGBA 0x00800000
196
197 #define FX_UM_E_IFMT 0x00fff000
198
199 #define FX_UM_COLOR_ITERATED 0x01000000
200 #define FX_UM_COLOR_CONSTANT 0x02000000
201 #define FX_UM_ALPHA_ITERATED 0x04000000
202 #define FX_UM_ALPHA_CONSTANT 0x08000000
203
204
205 /*
206 Memory range from startAddr to endAddr-1
207 */
208 typedef struct MemRange_t {
209 struct MemRange_t *next;
210 FxU32 startAddr, endAddr;
211 } MemRange;
212
213 typedef struct {
214 GLsizei width, height; /* image size */
215 GrTextureFormat_t glideFormat; /* Glide image format */
216 unsigned short *data; /* Glide-formated texture image */
217 } tfxMipMapLevel;
218
219 typedef struct tfxTexInfo_t {
220 struct tfxTexInfo *next;
221 struct gl_texture_object *tObj;
222
223 GLuint lastTimeUsed;
224 FxU32 whichTMU;
225 GLboolean isInTM;
226
227 tfxMipMapLevel mipmapLevel[MAX_TEXTURE_LEVELS];
228
229 MemRange *tm[FX_NUM_TMU];
230
231 GLint minLevel, maxLevel;
232 GLint baseLevelInternalFormat;
233
234 GrTexInfo info;
235
236 GrTextureFilterMode_t minFilt;
237 GrTextureFilterMode_t maxFilt;
238 FxBool LODblend;
239
240 GrTextureClampMode_t sClamp;
241 GrTextureClampMode_t tClamp;
242
243 GrMipMapMode_t mmMode;
244
245 GLfloat sScale, tScale;
246 GLint int_sScale, int_tScale; /* x86 floating point trick for
247 * multiplication by powers of 2.
248 * Used in fxfasttmp.h
249 */
250
251 GuTexPalette palette;
252
253 GLboolean fixedPalette;
254 GLboolean validated;
255 } tfxTexInfo;
256
257 typedef struct {
258 GLuint swapBuffer;
259 GLuint reqTexUpload;
260 GLuint texUpload;
261 GLuint memTexUpload;
262 } tfxStats;
263
264
265
266 typedef struct {
267 /* Alpha test */
268
269 GLboolean alphaTestEnabled;
270 GrCmpFnc_t alphaTestFunc;
271 GrAlpha_t alphaTestRefValue;
272
273 /* Blend function */
274
275 GLboolean blendEnabled;
276 GrAlphaBlendFnc_t blendSrcFuncRGB;
277 GrAlphaBlendFnc_t blendDstFuncRGB;
278 GrAlphaBlendFnc_t blendSrcFuncAlpha;
279 GrAlphaBlendFnc_t blendDstFuncAlpha;
280
281 /* Depth test */
282
283 GLboolean depthTestEnabled;
284 GLboolean depthMask;
285 GrCmpFnc_t depthTestFunc;
286 } tfxUnitsState;
287
288
289
290
291 /* Flags for fxMesa->new_state
292 */
293 #define FX_NEW_TEXTURING 0x1
294 #define FX_NEW_BLEND 0x2
295 #define FX_NEW_ALPHA 0x4
296 #define FX_NEW_DEPTH 0x8
297 #define FX_NEW_FOG 0x10
298 #define FX_NEW_SCISSOR 0x20
299 #define FX_NEW_COLOR_MASK 0x40
300 #define FX_NEW_CULL 0x80
301
302
303 #define FX_CONTEXT(ctx) ((fxMesaContext)((ctx)->DriverCtx))
304 #define FX_TEXTURE_DATA(t) fxTMGetTexInfo((t)->_Current)
305
306 #define BEGIN_BOARD_LOCK()
307 #define END_BOARD_LOCK()
308 #define BEGIN_CLIP_LOOP()
309 #define END_CLIP_LOOP()
310
311
312
313
314 /* Covers the state referenced by IsInHardware:
315 */
316 #define _FX_NEW_IS_IN_HARDWARE (_NEW_TEXTURE| \
317 _NEW_HINT| \
318 _NEW_STENCIL| \
319 _NEW_BUFFERS| \
320 _NEW_COLOR| \
321 _NEW_LIGHT)
322
323 /* Covers the state referenced by fxDDChooseRenderState
324 */
325 #define _FX_NEW_RENDERSTATE (_FX_NEW_IS_IN_HARDWARE | \
326 _DD_NEW_FLATSHADE | \
327 _DD_NEW_TRI_LIGHT_TWOSIDE| \
328 _DD_NEW_TRI_OFFSET | \
329 _DD_NEW_TRI_UNFILLED | \
330 _DD_NEW_TRI_SMOOTH | \
331 _DD_NEW_TRI_STIPPLE | \
332 _DD_NEW_LINE_SMOOTH | \
333 _DD_NEW_LINE_STIPPLE | \
334 _DD_NEW_LINE_WIDTH | \
335 _DD_NEW_POINT_SMOOTH | \
336 _DD_NEW_POINT_SIZE | \
337 _NEW_LINE)
338
339 /* Covers the state referenced by fxDDChooseSetupFunction.
340 */
341 #define _FX_NEW_SETUP_FUNCTION (_NEW_LIGHT| \
342 _NEW_FOG| \
343 _NEW_TEXTURE| \
344 _NEW_COLOR) \
345
346
347 /* Covers the state referenced in fxDDCheckVtxfmt.
348 */
349 #define _FX_NEW_VTXFMT (_NEW_TEXTURE | \
350 _NEW_TEXTURE_MATRIX | \
351 _NEW_TRANSFORM | \
352 _NEW_LIGHT | \
353 _NEW_PROJECTION | \
354 _NEW_MODELVIEW | \
355 _TNL_NEW_NEED_EYE_COORDS | \
356 _FX_NEW_RENDERSTATE)
357
358
359 /* These lookup table are used to extract RGB values in [0,255] from
360 * 16-bit pixel values.
361 */
362 extern GLubyte FX_PixelToR[0x10000];
363 extern GLubyte FX_PixelToG[0x10000];
364 extern GLubyte FX_PixelToB[0x10000];
365
366
367 typedef void (*fx_tri_func)( GLcontext *, const fxVertex *,
368 const fxVertex *, const fxVertex * );
369 typedef void (*fx_line_func)( GLcontext *, const fxVertex *, const fxVertex * );
370 typedef void (*fx_point_func)( GLcontext *, const fxVertex * );
371
372 struct tfxMesaContext {
373 GuTexPalette glbPalette;
374
375 GLcontext *glCtx; /* the core Mesa context */
376 GLvisual *glVis; /* describes the color buffer */
377 GLframebuffer *glBuffer; /* the ancillary buffers */
378
379 GLint board; /* the board used for this context */
380 GLint width, height; /* size of color buffer */
381
382 GrBuffer_t currentFB;
383
384 GLboolean bgrOrder;
385 GrColor_t color;
386 GrColor_t clearC;
387 GrAlpha_t clearA;
388 GLuint constColor;
389 GrCullMode_t cullMode;
390
391 tfxUnitsState unitsState;
392 tfxUnitsState restoreUnitsState; /* saved during multipass */
393
394
395 GLuint new_state;
396
397 /* Texture Memory Manager Data
398 */
399 GLuint texBindNumber;
400 GLint tmuSrc;
401 GLuint lastUnitsMode;
402 GLuint freeTexMem[FX_NUM_TMU];
403 MemRange *tmPool;
404 MemRange *tmFree[FX_NUM_TMU];
405
406 GLenum fogTableMode;
407 GLfloat fogDensity;
408 GLfloat fogStart, fogEnd;
409 GrFog_t *fogTable;
410 GLint textureAlign;
411
412 /* Vertex building and storage:
413 */
414 GLuint tmu_source[FX_NUM_TMU];
415 GLuint tex_dest[MAX_TEXTURE_UNITS];
416 GLuint setupindex;
417 GLuint setup_gone; /* for multipass */
418 GLuint stw_hint_state; /* for grHints */
419 fxVertex *verts;
420
421
422 /* Rasterization:
423 */
424 GLuint render_index;
425 GLuint passes, multipass;
426 GLuint is_in_hardware;
427 GLenum render_prim;
428
429 /* Current rasterization functions
430 */
431 fx_point_func draw_point;
432 fx_line_func draw_line;
433 fx_tri_func draw_tri;
434
435 /* System to turn culling on/off for tris/lines/points.
436 */
437 fx_point_func initial_point;
438 fx_line_func initial_line;
439 fx_tri_func initial_tri;
440
441 fx_point_func subsequent_point;
442 fx_line_func subsequent_line;
443 fx_tri_func subsequent_tri;
444
445 /* Keep texture scales somewhere handy:
446 */
447 GLfloat s0scale;
448 GLfloat s1scale;
449 GLfloat t0scale;
450 GLfloat t1scale;
451
452 GLfloat inv_s0scale;
453 GLfloat inv_s1scale;
454 GLfloat inv_t0scale;
455 GLfloat inv_t1scale;
456
457 /* Glide stuff
458 */
459 tfxStats stats;
460 void *state;
461
462 /* Options */
463
464 GLboolean verbose;
465 GLboolean haveTwoTMUs; /* True if we really have 2 tmu's */
466 GLboolean emulateTwoTMUs; /* True if we present 2 tmu's to mesa. */
467 GLboolean haveAlphaBuffer;
468 GLboolean haveZBuffer;
469 GLboolean haveDoubleBuffer;
470 GLboolean haveGlobalPaletteTexture;
471 GLint swapInterval;
472 GLint maxPendingSwapBuffers;
473
474 FX_GrContext_t glideContext;
475
476 int screen_width;
477 int screen_height;
478 int initDone;
479 int clipMinX;
480 int clipMaxX;
481 int clipMinY;
482 int clipMaxY;
483
484 /* fxvtxfmt
485 */
486 GLboolean allow_vfmt;
487 GLvertexformat vtxfmt;
488 fxClipVertex current;
489 fxClipVertex *vert; /* points into verts[] */
490 void (*fire_on_vertex)( GLcontext * );
491 void (*fire_on_end)( GLcontext * );
492 void (*fire_on_fallback)( GLcontext * );
493
494 vfmt_project_func project_vertex;
495 vfmt_interpolate_func interpolate_vertices;
496
497 int vtxfmt_fallback_count;
498 int vtxfmt_installed;
499 void (*old_begin)( GLenum );
500 GLenum prim;
501
502 GLuint accel_light;
503 GLfloat basecolor[4];
504
505
506 /* Projected vertices, fastpath data:
507 */
508 GLvector1ui clipped_elements;
509 fxVertex *last_vert;
510 GLuint size;
511 };
512
513 typedef void (*tfxSetupFunc)(GLcontext *ctx, GLuint, GLuint );
514
515 extern GrHwConfiguration glbHWConfig;
516 extern int glbCurrentBoard;
517
518 extern void fxSetupFXUnits(GLcontext *);
519 extern void fxSetupDDPointers(GLcontext *);
520
521 /* fxvsetup:
522 */
523 extern void fxDDSetupInit(void);
524 extern void fxAllocVB( GLcontext *ctx );
525 extern void fxFreeVB( GLcontext *ctx );
526 extern void fxPrintSetupFlags( const char *msg, GLuint flags );
527 extern void fx_BuildProjVerts( GLcontext *ctx,
528 GLuint start, GLuint count,
529 GLuint newinputs );
530 extern void fx_validate_BuildProjVerts(GLcontext *ctx,
531 GLuint start, GLuint count,
532 GLuint newinputs );
533
534 /* fxtrifuncs:
535 */
536 extern void fxDDTrifuncInit(void);
537 extern void fxDDChooseRenderState( GLcontext *ctx );
538
539
540 extern void fxUpdateDDSpanPointers(GLcontext *);
541 extern void fxSetupDDSpanPointers(GLcontext *);
542
543 extern void fxPrintTextureData(tfxTexInfo *ti);
544 extern GLboolean fxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level,
545 GLenum format, GLenum type, const GLvoid *pixels,
546 const struct gl_pixelstore_attrib *packing,
547 struct gl_texture_object *texObj,
548 struct gl_texture_image *texImage,
549 GLboolean *retainInternalCopy);
550 extern GLboolean fxDDTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
551 GLint xoffset, GLint yoffset,
552 GLsizei width, GLsizei height,
553 GLenum format, GLenum type, const GLvoid *pixels,
554 const struct gl_pixelstore_attrib *packing,
555 struct gl_texture_object *texObj,
556 struct gl_texture_image *texImage);
557 extern GLvoid *fxDDGetTexImage(GLcontext *ctx, GLenum target, GLint level,
558 const struct gl_texture_object *texObj,
559 GLenum *formatOut, GLenum *typeOut,
560 GLboolean *freeImageOut );
561 extern void fxDDTexEnv(GLcontext *, GLenum, GLenum, const GLfloat *);
562 extern void fxDDTexParam(GLcontext *, GLenum, struct gl_texture_object *,
563 GLenum, const GLfloat *);
564 extern void fxDDTexBind(GLcontext *, GLenum, struct gl_texture_object *);
565 extern void fxDDTexDel(GLcontext *, struct gl_texture_object *);
566 extern void fxDDTexPalette(GLcontext *, struct gl_texture_object *);
567 extern void fxDDTexUseGlbPalette(GLcontext *, GLboolean);
568
569 extern void fxDDEnable(GLcontext *, GLenum, GLboolean);
570 extern void fxDDAlphaFunc(GLcontext *, GLenum, GLclampf);
571 extern void fxDDBlendFunc(GLcontext *, GLenum, GLenum);
572 extern void fxDDDepthMask(GLcontext *, GLboolean);
573 extern void fxDDDepthFunc(GLcontext *, GLenum);
574
575 extern void fxDDInitExtensions( GLcontext *ctx );
576
577 #define fxTMGetTexInfo(o) ((tfxTexInfo*)((o)->DriverData))
578 extern void fxTMInit(fxMesaContext ctx);
579 extern void fxTMClose(fxMesaContext ctx);
580 extern void fxTMRestoreTextures_NoLock(fxMesaContext ctx);
581 extern void fxTMMoveInTM(fxMesaContext, struct gl_texture_object *, GLint);
582 extern void fxTMMoveOutTM(fxMesaContext, struct gl_texture_object *);
583 #define fxTMMoveOutTM_NoLock fxTMMoveOutTM
584 extern void fxTMFreeTexture(fxMesaContext, struct gl_texture_object *);
585 extern void fxTMReloadMipMapLevel(fxMesaContext, struct gl_texture_object *, GLint);
586 extern void fxTMReloadSubMipMapLevel(fxMesaContext, struct gl_texture_object *,
587 GLint, GLint, GLint);
588
589 extern void fxTexGetFormat(GLenum, GrTextureFormat_t *, GLint *);
590 extern int fxTexGetInfo(int, int, GrLOD_t *, GrAspectRatio_t *,
591 float *, float *, int *, int *, int *, int *);
592
593 extern void fxDDScissor( GLcontext *ctx,
594 GLint x, GLint y, GLsizei w, GLsizei h );
595 extern void fxDDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *params );
596 extern void fxDDColorMask(GLcontext *ctx,
597 GLboolean r, GLboolean g,
598 GLboolean b, GLboolean a );
599
600 extern void fxDDWriteDepthSpan(GLcontext *ctx, GLuint n, GLint x, GLint y,
601 const GLdepth depth[], const GLubyte mask[]);
602
603 extern void fxDDReadDepthSpan(GLcontext *ctx, GLuint n, GLint x, GLint y,
604 GLdepth depth[]);
605
606 extern void fxDDWriteDepthPixels(GLcontext *ctx, GLuint n,
607 const GLint x[], const GLint y[],
608 const GLdepth depth[], const GLubyte mask[]);
609
610 extern void fxDDReadDepthPixels(GLcontext *ctx, GLuint n,
611 const GLint x[], const GLint y[],
612 GLdepth depth[]);
613
614 extern void fxDDShadeModel(GLcontext *ctx, GLenum mode);
615
616 extern void fxDDCullFace(GLcontext *ctx, GLenum mode);
617 extern void fxDDFrontFace(GLcontext *ctx, GLenum mode);
618
619 extern void fxPrintRenderState( const char *msg, GLuint state );
620 extern void fxPrintHintState( const char *msg, GLuint state );
621
622 extern int fxDDInitFxMesaContext( fxMesaContext fxMesa );
623 extern void fxDDDestroyFxMesaContext( fxMesaContext fxMesa );
624
625
626
627
628 extern void fxSetScissorValues(GLcontext *ctx);
629 extern void fxTMMoveInTM_NoLock(fxMesaContext fxMesa,
630 struct gl_texture_object *tObj,
631 GLint where);
632 extern void fxInitPixelTables(fxMesaContext fxMesa, GLboolean bgrOrder);
633
634
635 /* fxvtxfmt:
636 */
637 extern void fxDDCheckVtxfmt( GLcontext *ctx );
638 extern void fx_update_lighting( GLcontext *ctx );
639 extern void fxDDInitVtxfmt( GLcontext *ctx );
640
641 /* fxsimplerender
642 */
643 extern const struct gl_pipeline_stage fx_render_stage;
644
645 #endif