diff options
Diffstat (limited to 'xc/extras/Mesa/src/FX/fxdrv.h')
-rw-r--r-- | xc/extras/Mesa/src/FX/fxdrv.h | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/xc/extras/Mesa/src/FX/fxdrv.h b/xc/extras/Mesa/src/FX/fxdrv.h index c85c73d8e..eea75fc56 100644 --- a/xc/extras/Mesa/src/FX/fxdrv.h +++ b/xc/extras/Mesa/src/FX/fxdrv.h @@ -162,6 +162,7 @@ typedef struct { #endif #endif + #define FX_VB_COLOR(fxm, color) \ do { \ if (sizeof(GLint) == 4*sizeof(GLubyte)) { \ @@ -257,6 +258,20 @@ typedef struct { #define FX_UM_ALPHA_ITERATED 0x04000000 #define FX_UM_ALPHA_CONSTANT 0x08000000 + +#define PACK_BGRA32(R, G, B, A) \ + ( (((GLuint) (R)) << 16) | \ + (((GLuint) (G)) << 8) | \ + (((GLuint) (B)) ) | \ + (((GLuint) (A)) << 24) ) + +#define PACK_RGBA32(R, G, B, A) \ + ( (((GLuint) (R)) ) | \ + (((GLuint) (G)) << 8) | \ + (((GLuint) (B)) << 16) | \ + (((GLuint) (A)) << 24) ) + + typedef void (*tfxRenderVBFunc)(GLcontext *); /* @@ -269,6 +284,7 @@ typedef struct MemRange_t { typedef struct { GLsizei width, height; /* image size */ + GLint texelSize; /* How many bytes to a texel */ GrTextureFormat_t glideFormat; /* Glide image format */ unsigned short *data; /* Glide-formated texture image */ } tfxMipMapLevel; @@ -339,27 +355,20 @@ extern tfxLineClipFunc fxLineClipTab[0x8]; typedef struct { /* Alpha test */ - GLboolean alphaTestEnabled; GrCmpFnc_t alphaTestFunc; GrAlpha_t alphaTestRefValue; /* Blend function */ - GLboolean blendEnabled; GrAlphaBlendFnc_t blendSrcFuncRGB; GrAlphaBlendFnc_t blendDstFuncRGB; GrAlphaBlendFnc_t blendSrcFuncAlpha; GrAlphaBlendFnc_t blendDstFuncAlpha; - - /* Depth test */ - - GLboolean depthTestEnabled; - GLboolean depthMask; - GrCmpFnc_t depthTestFunc; } tfxUnitsState; + /* Flags for render_index. */ #define FX_OFFSET 0x1 @@ -380,6 +389,7 @@ typedef struct { #define FX_NEW_SCISSOR 0x20 #define FX_NEW_COLOR_MASK 0x40 #define FX_NEW_CULL 0x80 +#define FX_NEW_STENCIL 0x100 /* FX struct stored in VB->driver_data. */ @@ -421,13 +431,9 @@ extern GLubyte FX_PixelToB[0x10000]; struct tfxMesaContext { - GuTexPalette glbPalette; - GLcontext *glCtx; /* the core Mesa context */ -#if !defined(XFree86Server) && !defined(GLX_DIRECT_RENDERING) GLvisual *glVis; /* describes the color buffer */ GLframebuffer *glBuffer; /* the ancillary buffers */ -#endif GLint board; /* the board used for this context */ GLint width, height; /* size of color buffer */ @@ -435,6 +441,7 @@ struct tfxMesaContext { GrBuffer_t currentFB; GLboolean bgrOrder; + GLuint depthClear; GrColor_t color; GrColor_t clearC; GrAlpha_t clearA; @@ -444,6 +451,8 @@ struct tfxMesaContext { tfxUnitsState unitsState; tfxUnitsState restoreUnitsState; /* saved during multipass */ + GuTexPalette glbPalette; + GLuint tmu_source[FX_NUM_TMU]; GLuint tex_dest[MAX_TEXTURE_UNITS]; GLuint setupindex; @@ -467,7 +476,6 @@ struct tfxMesaContext { GLuint texBindNumber; GLint tmuSrc; - GLuint lastUnitsMode; GLuint freeTexMem[FX_NUM_TMU]; MemRange *tmPool; MemRange *tmFree[FX_NUM_TMU]; @@ -502,8 +510,7 @@ struct tfxMesaContext { GLboolean haveTwoTMUs; /* True if we really have 2 tmu's */ GLboolean emulateTwoTMUs; /* True if we present 2 tmu's to mesa. */ GLboolean haveAlphaBuffer; - GLboolean haveZBuffer; - GLboolean haveDoubleBuffer; + GLboolean haveHwStencil; GLboolean haveGlobalPaletteTexture; GLint swapInterval; GLint maxPendingSwapBuffers; @@ -592,8 +599,6 @@ extern void fxDDTexUseGlbPalette(GLcontext *, GLboolean); extern void fxDDEnable(GLcontext *, GLenum, GLboolean); extern void fxDDAlphaFunc(GLcontext *, GLenum, GLclampf); extern void fxDDBlendFunc(GLcontext *, GLenum, GLenum); -extern void fxDDDepthMask(GLcontext *, GLboolean); -extern void fxDDDepthFunc(GLcontext *, GLenum); extern void fxDDRegisterVB( struct vertex_buffer *VB ); extern void fxDDUnregisterVB( struct vertex_buffer *VB ); |