2 * Mesa 3-D graphics library
5 * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 /* fxsetup.c - 3Dfx VooDoo rendering mode setup functions */
40 /* If you comment out this define, a variable takes its place, letting
41 * you turn debugging on/off from the debugger.
47 #if defined(__linux__)
57 #include "GL/fxmesa.h"
60 #include "math/m_vector.h"
63 /* Define some shorter names for these things.
65 #define XCOORD GR_VERTEX_X_OFFSET
66 #define YCOORD GR_VERTEX_Y_OFFSET
67 #define ZCOORD GR_VERTEX_OOZ_OFFSET
68 #define OOWCOORD GR_VERTEX_OOW_OFFSET
70 #define S0COORD GR_VERTEX_SOW_TMU0_OFFSET
71 #define T0COORD GR_VERTEX_TOW_TMU0_OFFSET
72 #define S1COORD GR_VERTEX_SOW_TMU1_OFFSET
73 #define T1COORD GR_VERTEX_TOW_TMU1_OFFSET
78 #define FXCOLOR4( c ) (* (int *)c)
80 #define FXCOLOR4( c ) ( \
81 ( ((unsigned int)(c[3]))<<24 ) | \
82 ( ((unsigned int)(c[2]))<<16 ) | \
83 ( ((unsigned int)(c[1]))<<8 ) | \
84 ( (unsigned int)(c[0])) )
87 #define TDFXPACKCOLOR1555( r, g, b, a ) \
88 ((((r) & 0xf8) << 7) | (((g) & 0xf8) << 2) | (((b) & 0xf8) >> 3) | \
90 #define TDFXPACKCOLOR565( r, g, b ) \
91 ((((r) & 0xf8) << 8) | (((g) & 0xfc) << 3) | (((b) & 0xf8) >> 3))
92 #define TDFXPACKCOLOR8888( r, g, b, a ) \
93 (((a) << 24) | ((r) << 16) | ((g) << 8) | (b))
97 /* fastpath flags first
99 #define SETUP_TMU0 0x1
100 #define SETUP_TMU1 0x2
101 #define SETUP_RGBA 0x4
102 #define SETUP_SNAP 0x8
103 #define SETUP_XYZW 0x10
104 #define SETUP_PTEX 0x20
105 #define SETUP_PSIZ 0x40
106 #define SETUP_SPEC 0x80
107 #define MAX_SETUP 0x100
112 #define FX_TMU0 GR_TMU0
113 #define FX_TMU1 GR_TMU1
114 #define FX_TMU_SPLIT 98
115 #define FX_TMU_BOTH 99
116 #define FX_TMU_NONE 100
118 /* Used for fxMesa->lastUnitsMode */
120 #define FX_UM_NONE 0x00000000
122 #define FX_UM_E0_REPLACE 0x00000001
123 #define FX_UM_E0_MODULATE 0x00000002
124 #define FX_UM_E0_DECAL 0x00000004
125 #define FX_UM_E0_BLEND 0x00000008
126 #define FX_UM_E0_ADD 0x00000010
128 #define FX_UM_E1_REPLACE 0x00000020
129 #define FX_UM_E1_MODULATE 0x00000040
130 #define FX_UM_E1_DECAL 0x00000080
131 #define FX_UM_E1_BLEND 0x00000100
132 #define FX_UM_E1_ADD 0x00000200
134 #define FX_UM_E_ENVMODE 0x000003ff
136 #define FX_UM_E0_ALPHA 0x00001000
137 #define FX_UM_E0_LUMINANCE 0x00002000
138 #define FX_UM_E0_LUMINANCE_ALPHA 0x00004000
139 #define FX_UM_E0_INTENSITY 0x00008000
140 #define FX_UM_E0_RGB 0x00010000
141 #define FX_UM_E0_RGBA 0x00020000
143 #define FX_UM_E1_ALPHA 0x00040000
144 #define FX_UM_E1_LUMINANCE 0x00080000
145 #define FX_UM_E1_LUMINANCE_ALPHA 0x00100000
146 #define FX_UM_E1_INTENSITY 0x00200000
147 #define FX_UM_E1_RGB 0x00400000
148 #define FX_UM_E1_RGBA 0x00800000
150 #define FX_UM_E_IFMT 0x00fff000
152 #define FX_UM_COLOR_ITERATED 0x01000000
153 #define FX_UM_COLOR_CONSTANT 0x02000000
154 #define FX_UM_ALPHA_ITERATED 0x04000000
155 #define FX_UM_ALPHA_CONSTANT 0x08000000
158 /* for Voodoo3/Banshee's grColorCombine() and grAlphaCombine() */
159 struct tdfx_combine
{
160 GrCombineFunction_t Function
; /* Combine function */
161 GrCombineFactor_t Factor
; /* Combine scale factor */
162 GrCombineLocal_t Local
; /* Local combine source */
163 GrCombineOther_t Other
; /* Other combine source */
164 FxBool Invert
; /* Combine result inversion flag */
167 /* for Voodoo3's grTexCombine() */
168 struct tdfx_texcombine
{
169 GrCombineFunction_t FunctionRGB
;
170 GrCombineFactor_t FactorRGB
;
171 GrCombineFunction_t FunctionAlpha
;
172 GrCombineFactor_t FactorAlpha
;
178 /* for Voodoo5's grColorCombineExt() */
179 struct tdfx_combine_color_ext
{
180 GrCCUColor_t SourceA
;
181 GrCombineMode_t ModeA
;
182 GrCCUColor_t SourceB
;
183 GrCombineMode_t ModeB
;
184 GrCCUColor_t SourceC
;
186 GrCCUColor_t SourceD
;
192 /* for Voodoo5's grAlphaCombineExt() */
193 struct tdfx_combine_alpha_ext
{
194 GrACUColor_t SourceA
;
195 GrCombineMode_t ModeA
;
196 GrACUColor_t SourceB
;
197 GrCombineMode_t ModeB
;
198 GrACUColor_t SourceC
;
200 GrACUColor_t SourceD
;
206 /* for Voodoo5's grTexColorCombineExt() */
207 struct tdfx_color_texenv
{
208 GrTCCUColor_t SourceA
;
209 GrCombineMode_t ModeA
;
210 GrTCCUColor_t SourceB
;
211 GrCombineMode_t ModeB
;
212 GrTCCUColor_t SourceC
;
214 GrTCCUColor_t SourceD
;
220 /* for Voodoo5's grTexAlphaCombineExt() */
221 struct tdfx_alpha_texenv
{
222 GrTACUColor_t SourceA
;
223 GrCombineMode_t ModeA
;
224 GrTACUColor_t SourceB
;
225 GrCombineMode_t ModeB
;
226 GrTACUColor_t SourceC
;
228 GrTCCUColor_t SourceD
;
234 /* Voodoo5's texture combine environment */
235 struct tdfx_texcombine_ext
{
236 struct tdfx_alpha_texenv Alpha
;
237 struct tdfx_color_texenv Color
;
243 Memory range from startAddr to endAddr-1
245 typedef struct MemRange_t
247 struct MemRange_t
*next
;
248 FxU32 startAddr
, endAddr
;
254 GLsizei width
, height
; /* image size */
255 GLint wScale
, hScale
; /* image scale factor */
256 GrTextureFormat_t glideFormat
; /* Glide image format */
261 * TDFX-specific texture object data. This hangs off of the
262 * struct gl_texture_object DriverData pointer.
264 typedef struct tfxTexInfo_t
266 struct tfxTexInfo_t
*next
;
267 struct gl_texture_object
*tObj
;
273 MemRange
*tm
[FX_NUM_TMU
];
275 GLint minLevel
, maxLevel
;
276 GLint baseLevelInternalFormat
;
280 GrTextureFilterMode_t minFilt
;
281 GrTextureFilterMode_t maxFilt
;
284 GrTextureClampMode_t sClamp
;
285 GrTextureClampMode_t tClamp
;
287 GrMipMapMode_t mmMode
;
289 GLfloat sScale
, tScale
;
291 GrTexTable_t paltype
;
292 GuTexPalette palette
;
294 GLboolean fixedPalette
;
314 GLboolean alphaTestEnabled
;
315 GrCmpFnc_t alphaTestFunc
;
316 GLfloat alphaTestRefValue
;
320 GLboolean blendEnabled
;
321 GrAlphaBlendFnc_t blendSrcFuncRGB
;
322 GrAlphaBlendFnc_t blendDstFuncRGB
;
323 GrAlphaBlendFnc_t blendSrcFuncAlpha
;
324 GrAlphaBlendFnc_t blendDstFuncAlpha
;
325 GrAlphaBlendOp_t blendEq
;
329 GLboolean depthTestEnabled
;
331 GrCmpFnc_t depthTestFunc
;
336 GLboolean stencilEnabled
;
337 GrCmpFnc_t stencilFunction
; /* Stencil function */
338 GrStencil_t stencilRefValue
; /* Stencil reference value */
339 GrStencil_t stencilValueMask
; /* Value mask */
340 GrStencil_t stencilWriteMask
; /* Write mask */
341 GrCmpFnc_t stencilFailFunc
; /* Stencil fail function */
342 GrCmpFnc_t stencilZFailFunc
; /* Stencil pass, depth fail function */
343 GrCmpFnc_t stencilZPassFunc
; /* Stencil pass, depth pass function */
344 GrStencil_t stencilClear
; /* Buffer clear value */
351 /* Flags for fxMesa->new_state
353 #define FX_NEW_TEXTURING 0x1
354 #define FX_NEW_BLEND 0x2
355 #define FX_NEW_ALPHA 0x4
356 #define FX_NEW_DEPTH 0x8
357 #define FX_NEW_FOG 0x10
358 #define FX_NEW_SCISSOR 0x20
359 #define FX_NEW_COLOR_MASK 0x40
360 #define FX_NEW_CULL 0x80
361 #define FX_NEW_STENCIL 0x100
364 #define FX_CONTEXT(ctx) ((fxMesaContext)((ctx)->DriverCtx))
366 #define FX_TEXTURE_DATA(texUnit) fxTMGetTexInfo((texUnit)->_Current)
368 #define fxTMGetTexInfo(o) ((tfxTexInfo*)((o)->DriverData))
370 #define FX_MIPMAP_DATA(img) ((tfxMipMapLevel *) (img)->DriverData)
372 #define BEGIN_BOARD_LOCK()
373 #define END_BOARD_LOCK()
374 #define BEGIN_CLIP_LOOP()
375 #define END_CLIP_LOOP()
380 /* Covers the state referenced by IsInHardware:
382 #define _FX_NEW_IS_IN_HARDWARE (_NEW_TEXTURE| \
389 /* Covers the state referenced by fxDDChooseRenderState
391 #define _FX_NEW_RENDERSTATE (_FX_NEW_IS_IN_HARDWARE | \
392 _DD_NEW_FLATSHADE | \
393 _DD_NEW_TRI_LIGHT_TWOSIDE| \
394 _DD_NEW_TRI_OFFSET | \
395 _DD_NEW_TRI_UNFILLED | \
396 _DD_NEW_TRI_SMOOTH | \
397 _DD_NEW_TRI_STIPPLE | \
398 _DD_NEW_LINE_SMOOTH | \
399 _DD_NEW_LINE_STIPPLE | \
400 _DD_NEW_LINE_WIDTH | \
401 _DD_NEW_POINT_SMOOTH | \
402 _DD_NEW_POINT_SIZE | \
406 /* Covers the state referenced by fxDDChooseSetupFunction.
408 #define _FX_NEW_SETUP_FUNCTION (_NEW_LIGHT| \
414 /* lookup table for scaling y bit colors up to 8 bits */
415 extern GLuint FX_rgb_scale_4
[16];
416 extern GLuint FX_rgb_scale_5
[32];
417 extern GLuint FX_rgb_scale_6
[64];
419 typedef void (*fx_tri_func
) (fxMesaContext
, GrVertex
*, GrVertex
*, GrVertex
*);
420 typedef void (*fx_line_func
) (fxMesaContext
, GrVertex
*, GrVertex
*);
421 typedef void (*fx_point_func
) (fxMesaContext
, GrVertex
*);
423 struct tfxMesaContext
425 GrTexTable_t glbPalType
;
426 GuTexPalette glbPalette
;
428 GLcontext
*glCtx
; /* the core Mesa context */
429 GLvisual
*glVis
; /* describes the color buffer */
430 GLframebuffer
*glBuffer
; /* the ancillary buffers */
432 GLint board
; /* the board used for this context */
433 GLint width
, height
; /* size of color buffer */
435 GrBuffer_t currentFB
;
442 GrCullMode_t cullMode
;
444 tfxUnitsState unitsState
;
445 tfxUnitsState restoreUnitsState
; /* saved during multipass */
451 /* Texture Memory Manager Data
453 GLuint texBindNumber
;
455 GLuint lastUnitsMode
;
456 GLuint freeTexMem
[FX_NUM_TMU
];
458 MemRange
*tmFree
[FX_NUM_TMU
];
462 GLfloat fogStart
, fogEnd
;
467 /* Vertex building and storage:
469 GLuint tmu_source
[FX_NUM_TMU
];
471 GLuint stw_hint_state
; /* for grHints */
473 GLboolean snapVertices
; /* needed for older Voodoo hardware */
479 GLenum render_primitive
;
480 GLenum raster_primitive
;
482 /* Current rasterization functions
484 fx_point_func draw_point
;
485 fx_line_func draw_line
;
486 fx_tri_func draw_tri
;
489 /* Keep texture scales somewhere handy:
509 GLboolean haveTwoTMUs
; /* True if we really have 2 tmu's */
510 GLboolean haveHwAlpha
;
511 GLboolean haveHwStencil
;
512 GLboolean haveZBuffer
;
513 GLboolean haveDoubleBuffer
;
514 GLboolean haveGlobalPaletteTexture
;
516 GLint maxPendingSwapBuffers
;
518 GrContext_t glideContext
;
530 /* Glide (per card) capabilities. These get mirrored
531 * from `glbHWConfig' when creating a new context...
534 FxBool HavePalExt
; /* PALETTE6666 */
535 FxBool HavePixExt
; /* PIXEXT */
536 FxBool HaveTexFmt
; /* TEXFMT */
537 FxBool HaveCmbExt
; /* COMBINE */
538 FxBool HaveMirExt
; /* TEXMIRROR */
539 FxBool HaveTexUma
; /* TEXUMA */
540 FxBool HaveTexus2
; /* Texus 2 - FXT1 */
541 struct tdfx_glide Glide
;
542 char rendererString
[64];
546 extern void fxSetupFXUnits(GLcontext
*);
547 extern void fxSetupDDPointers(GLcontext
*);
551 extern void fxAllocVB(GLcontext
* ctx
);
552 extern void fxFreeVB(GLcontext
* ctx
);
553 extern void fxPrintSetupFlags(char *msg
, GLuint flags
);
554 extern void fxCheckTexSizes( GLcontext
*ctx
);
555 extern void fxBuildVertices( GLcontext
*ctx
, GLuint start
, GLuint count
,
557 extern void fxChooseVertexState( GLcontext
*ctx
);
566 extern void fxDDInitTriFuncs(GLcontext
*);
567 extern void fxDDChooseRenderState(GLcontext
* ctx
);
570 extern void fxUpdateDDSpanPointers(GLcontext
*);
571 extern void fxSetupDDSpanPointers(GLcontext
*);
573 extern void fxPrintTextureData(tfxTexInfo
* ti
);
575 extern const struct gl_texture_format
*
576 fxDDChooseTextureFormat( GLcontext
*ctx
, GLint internalFormat
,
577 GLenum srcFormat
, GLenum srcType
);
578 extern void fxDDTexImage2D(GLcontext
* ctx
, GLenum target
, GLint level
,
579 GLint internalFormat
, GLint width
, GLint height
,
580 GLint border
, GLenum format
, GLenum type
,
581 const GLvoid
* pixels
,
582 const struct gl_pixelstore_attrib
*packing
,
583 struct gl_texture_object
*texObj
,
584 struct gl_texture_image
*texImage
);
585 extern void fxDDTexSubImage2D(GLcontext
* ctx
, GLenum target
, GLint level
,
586 GLint xoffset
, GLint yoffset
,
587 GLsizei width
, GLsizei height
,
588 GLenum format
, GLenum type
,
589 const GLvoid
* pixels
,
590 const struct gl_pixelstore_attrib
*packing
,
591 struct gl_texture_object
*texObj
,
592 struct gl_texture_image
*texImage
);
593 extern void fxDDCompressedTexImage2D(GLcontext
*ctx
, GLenum target
,
594 GLint level
, GLint internalFormat
,
595 GLsizei width
, GLsizei height
, GLint border
,
596 GLsizei imageSize
, const GLvoid
*data
,
597 struct gl_texture_object
*texObj
,
598 struct gl_texture_image
*texImage
);
599 extern void fxDDCompressedTexSubImage2D(GLcontext
*ctx
, GLenum target
,
600 GLint level
, GLint xoffset
,
601 GLint yoffset
, GLsizei width
,
602 GLint height
, GLenum format
,
603 GLsizei imageSize
, const GLvoid
*data
,
604 struct gl_texture_object
*texObj
,
605 struct gl_texture_image
*texImage
);
606 extern void fxDDTexImage1D(GLcontext
* ctx
, GLenum target
, GLint level
,
607 GLint internalFormat
, GLint width
,
608 GLint border
, GLenum format
, GLenum type
,
609 const GLvoid
* pixels
,
610 const struct gl_pixelstore_attrib
*packing
,
611 struct gl_texture_object
*texObj
,
612 struct gl_texture_image
*texImage
);
613 extern void fxDDTexSubImage1D(GLcontext
* ctx
, GLenum target
, GLint level
,
614 GLint xoffset
, GLint width
,
615 GLenum format
, GLenum type
,
616 const GLvoid
* pixels
,
617 const struct gl_pixelstore_attrib
*packing
,
618 struct gl_texture_object
*texObj
,
619 struct gl_texture_image
*texImage
);
620 extern GLboolean
fxDDTestProxyTexImage (GLcontext
*ctx
, GLenum target
,
621 GLint level
, GLint internalFormat
,
622 GLenum format
, GLenum type
,
623 GLint width
, GLint height
,
624 GLint depth
, GLint border
);
625 extern void fxDDTexEnv(GLcontext
*, GLenum
, GLenum
, const GLfloat
*);
626 extern void fxDDTexParam(GLcontext
*, GLenum
, struct gl_texture_object
*,
627 GLenum
, const GLfloat
*);
628 extern void fxDDTexBind(GLcontext
*, GLenum
, struct gl_texture_object
*);
629 extern struct gl_texture_object
*fxDDNewTextureObject( GLcontext
*ctx
, GLuint name
, GLenum target
);
630 extern void fxDDTexDel(GLcontext
*, struct gl_texture_object
*);
631 extern GLboolean
fxDDIsTextureResident(GLcontext
*, struct gl_texture_object
*);
632 extern void fxDDTexPalette(GLcontext
*, struct gl_texture_object
*);
633 extern void fxDDTexUseGlbPalette(GLcontext
*, GLboolean
);
635 extern void fxDDEnable(GLcontext
*, GLenum
, GLboolean
);
636 extern void fxDDAlphaFunc(GLcontext
*, GLenum
, GLfloat
);
637 extern void fxDDBlendFuncSeparate(GLcontext
*, GLenum
, GLenum
, GLenum
, GLenum
);
638 extern void fxDDBlendEquationSeparate(GLcontext
*, GLenum
, GLenum
);
639 extern void fxDDDepthMask(GLcontext
*, GLboolean
);
640 extern void fxDDDepthFunc(GLcontext
*, GLenum
);
641 extern void fxDDStencilFunc (GLcontext
*ctx
, GLenum func
, GLint ref
, GLuint mask
);
642 extern void fxDDStencilMask (GLcontext
*ctx
, GLuint mask
);
643 extern void fxDDStencilOp (GLcontext
*ctx
, GLenum sfail
, GLenum zfail
, GLenum zpass
);
645 extern void fxDDInitExtensions(GLcontext
* ctx
);
647 extern void fxTMInit(fxMesaContext ctx
);
648 extern void fxTMClose(fxMesaContext ctx
);
649 extern void fxTMRestoreTextures_NoLock(fxMesaContext ctx
);
650 extern void fxTMMoveInTM(fxMesaContext
, struct gl_texture_object
*, GLint
);
651 extern void fxTMMoveOutTM(fxMesaContext
, struct gl_texture_object
*);
652 #define fxTMMoveOutTM_NoLock fxTMMoveOutTM
653 extern void fxTMFreeTexture(fxMesaContext
, struct gl_texture_object
*);
654 extern void fxTMReloadMipMapLevel(fxMesaContext
, struct gl_texture_object
*,
656 extern void fxTMReloadSubMipMapLevel(fxMesaContext
,
657 struct gl_texture_object
*, GLint
, GLint
,
659 extern int fxTMCheckStartAddr (fxMesaContext fxMesa
, GLint tmu
, tfxTexInfo
*ti
);
661 extern void fxTexGetFormat(GLcontext
*, GLenum
, GrTextureFormat_t
*, GLint
*); /* [koolsmoky] */
663 extern int fxTexGetInfo(int, int, GrLOD_t
*, GrAspectRatio_t
*,
664 float *, float *, int *, int *);
666 extern void fxDDScissor(GLcontext
* ctx
,
667 GLint x
, GLint y
, GLsizei w
, GLsizei h
);
668 extern void fxDDFogfv(GLcontext
* ctx
, GLenum pname
, const GLfloat
* params
);
669 extern void fxDDColorMask(GLcontext
* ctx
,
670 GLboolean r
, GLboolean g
, GLboolean b
, GLboolean a
);
672 extern void fxDDWriteDepthSpan(GLcontext
* ctx
, GLuint n
, GLint x
, GLint y
,
673 const GLdepth depth
[], const GLubyte mask
[]);
675 extern void fxDDReadDepthSpan(GLcontext
* ctx
, GLuint n
, GLint x
, GLint y
,
678 extern void fxDDWriteDepthPixels(GLcontext
* ctx
, GLuint n
,
679 const GLint x
[], const GLint y
[],
680 const GLdepth depth
[], const GLubyte mask
[]);
682 extern void fxDDReadDepthPixels(GLcontext
* ctx
, GLuint n
,
683 const GLint x
[], const GLint y
[],
686 extern void fxDDShadeModel(GLcontext
* ctx
, GLenum mode
);
688 extern void fxDDCullFace(GLcontext
* ctx
, GLenum mode
);
689 extern void fxDDFrontFace(GLcontext
* ctx
, GLenum mode
);
691 extern void fxPrintRenderState(const char *msg
, GLuint state
);
692 extern void fxPrintHintState(const char *msg
, GLuint state
);
694 extern int fxDDInitFxMesaContext(fxMesaContext fxMesa
);
695 extern void fxDDDestroyFxMesaContext(fxMesaContext fxMesa
);
698 extern void fxSetScissorValues(GLcontext
* ctx
);
699 extern void fxTMMoveInTM_NoLock(fxMesaContext fxMesa
,
700 struct gl_texture_object
*tObj
, GLint where
);
702 extern void fxCheckIsInHardware(GLcontext
*ctx
);
705 * semi-private functions
707 void fxSetupCull (GLcontext
* ctx
);
708 void fxSetupScissor (GLcontext
* ctx
);
709 void fxSetupColorMask (GLcontext
* ctx
);
710 void fxSetupBlend (GLcontext
*ctx
);
711 void fxSetupDepthTest (GLcontext
*ctx
);
712 void fxSetupTexture (GLcontext
*ctx
);
714 /* Flags for software fallback cases */
715 #define FX_FALLBACK_TEXTURE_MAP 0x0001
716 #define FX_FALLBACK_DRAW_BUFFER 0x0002
717 #define FX_FALLBACK_SPECULAR 0x0004
718 #define FX_FALLBACK_STENCIL 0x0008
719 #define FX_FALLBACK_RENDER_MODE 0x0010
720 #define FX_FALLBACK_LOGICOP 0x0020
721 #define FX_FALLBACK_TEXTURE_ENV 0x0040
722 #define FX_FALLBACK_TEXTURE_BORDER 0x0080
723 #define FX_FALLBACK_COLORMASK 0x0100
724 #define FX_FALLBACK_BLEND 0x0200
725 #define FX_FALLBACK_TEXTURE_MULTI 0x0400
727 extern GLuint
fx_check_IsInHardware(GLcontext
*ctx
);
729 /* run-time debugging */
731 extern int TDFX_DEBUG
;
737 #define FX_RESCALE_BIG_TEXURES_HACK 1
738 #define FX_COMPRESS_S3TC_AS_FXT1_HACK 1