diff options
author | Daniel Borca <dborca@users.sourceforge.net> | 2004-09-13 09:27:03 +0000 |
---|---|---|
committer | Daniel Borca <dborca@users.sourceforge.net> | 2004-09-13 09:27:03 +0000 |
commit | eabfd43ad402539f58bcb16bc736e71516bb9aba (patch) | |
tree | e656e56e75179ac8ea2b9a16d2bcf03f97312046 /src/mesa | |
parent | a9ea1628da5f17274cd7ee023f438046dc992073 (diff) |
cleanup
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/glide/fx.rc | 6 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxapi.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxddspan.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxddtex.c | 47 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxdrv.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxglidew.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxsetup.c | 24 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxsetup.h | 12 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxtexman.c | 12 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxvb.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxwgl.c | 9 |
11 files changed, 29 insertions, 102 deletions
diff --git a/src/mesa/drivers/glide/fx.rc b/src/mesa/drivers/glide/fx.rc index f9caf9860a..9e36fb5845 100644 --- a/src/mesa/drivers/glide/fx.rc +++ b/src/mesa/drivers/glide/fx.rc @@ -5,10 +5,10 @@ #define HWSTR "3dfx Voodoo Graphics, Voodoo^2, Voodoo Banshee, Velocity 100/200, Voodoo3, Voodoo4, Voodoo5" #define COPYRIGHTSTR "Copyright \251 Brian E. Paul" -#define VERSIONSTR "6.1.0.9" +#define VERSIONSTR "6.2.0.1" #define MANVERSION 6 -#define MANREVISION 1 -#define BUILD_NUMBER 9 +#define MANREVISION 2 +#define BUILD_NUMBER 1 VS_VERSION_INFO VERSIONINFO FILEVERSION MANVERSION, MANREVISION, 0, BUILD_NUMBER diff --git a/src/mesa/drivers/glide/fxapi.c b/src/mesa/drivers/glide/fxapi.c index 17d49dddcb..5c77ed339f 100644 --- a/src/mesa/drivers/glide/fxapi.c +++ b/src/mesa/drivers/glide/fxapi.c @@ -356,11 +356,7 @@ fxMesaCreateContext(GLuint win, } grSstSelect(glbCurrentBoard); - /*grEnable(GR_OPENGL_MODE_EXT);*/ /* ZZZ: trick to make GL happy. - Glide3 will unmap memory for card when grSstWinClose is called. - This also forces the SLI band height to be 32 (above 1024x768) or 16 - and disables the splash screen due to y-origin swapping. - Note: We only want the former. */ + /*grEnable(GR_OPENGL_MODE_EXT);*/ /* [koolsmoky] */ voodoo = &glbHWConfig.SSTs[glbCurrentBoard]; fxMesa = (fxMesaContext)CALLOC_STRUCT(tfxMesaContext); @@ -411,7 +407,7 @@ fxMesaCreateContext(GLuint win, fxMesa->snapVertices = GL_FALSE; break; } - /* ZZZ TO DO: Add the old SLI/AA settings for Napalm. */ + /* XXX todo - Add the old SLI/AA settings for Napalm. */ switch(voodoo->numChips) { case 4: /* 4 chips */ switch(sliaa) { @@ -526,8 +522,6 @@ fxMesaCreateContext(GLuint win, goto errorhandler; } - /* ZZZ TODO: check if there is enough fbRam */ - /* Tips: * 1. we don't bother setting/checking AUX for stencil, because we'll decide * later whether we have HW stencil, based on depth buffer (thus AUX is diff --git a/src/mesa/drivers/glide/fxddspan.c b/src/mesa/drivers/glide/fxddspan.c index ce69eac83c..0949ea727c 100644 --- a/src/mesa/drivers/glide/fxddspan.c +++ b/src/mesa/drivers/glide/fxddspan.c @@ -100,7 +100,6 @@ #define HW_WRITE_CLIPLOOP() \ do { \ - /* [dBorca] Hack alert: */ \ /* remember, we need to flip the scissor, too */ \ /* is it better to do it inside fxDDScissor? */ \ const int minx = fxMesa->clipMinX; \ @@ -110,7 +109,6 @@ #define HW_READ_CLIPLOOP() \ do { \ - /* [dBorca] Hack alert: */ \ /* remember, we need to flip the scissor, too */ \ /* is it better to do it inside fxDDScissor? */ \ const int minx = fxMesa->clipMinX; \ diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c index f0bb74f82b..2ab30f75f6 100644 --- a/src/mesa/drivers/glide/fxddtex.c +++ b/src/mesa/drivers/glide/fxddtex.c @@ -615,21 +615,8 @@ fxDDTexUseGlbPalette(GLcontext * ctx, GLboolean state) fprintf(stderr, "fxDDTexUseGlbPalette(%d)\n", state); } - if (state) { - fxMesa->haveGlobalPaletteTexture = 1; - } - else { - fxMesa->haveGlobalPaletteTexture = 0; - - /* [dBorca] tis beyond my comprehension */ - if ((ctx->Texture.Unit[0]._Current == ctx->Texture.Unit[0].Current2D) && - (ctx->Texture.Unit[0]._Current != NULL)) { - struct gl_texture_object *tObj = ctx->Texture.Unit[0]._Current; - if (!tObj->DriverData) - tObj->DriverData = fxAllocTexObjData(fxMesa); - fxTexInvalidate(ctx, tObj); - } - } + fxMesa->haveGlobalPaletteTexture = state; + fxMesa->new_state |= FX_NEW_TEXTURING; } @@ -1539,17 +1526,7 @@ fxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level, ti->info.format = mml->glideFormat; texImage->FetchTexelc = fxFetchFunction(texImage->TexFormat->MesaFormat); - /* [dBorca] - * Hack alert: unsure... - */ - if (0 && ti->validated && ti->isInTM) { - /*fprintf(stderr, "reloadmipmaplevels\n"); */ - fxTMReloadMipMapLevel(fxMesa, texObj, level); - } - else { - /*fprintf(stderr, "invalidate2\n"); */ - fxTexInvalidate(ctx, texObj); - } + fxTexInvalidate(ctx, texObj); } @@ -1781,17 +1758,7 @@ fxDDCompressedTexImage2D (GLcontext *ctx, GLenum target, assert(!texImage->IsCompressed); } - /* [dBorca] - * Hack alert: unsure... - */ - if (0 && ti->validated && ti->isInTM) { - /*fprintf(stderr, "reloadmipmaplevels\n"); */ - fxTMReloadMipMapLevel(fxMesa, texObj, level); - } - else { - /*fprintf(stderr, "invalidate2\n"); */ - fxTexInvalidate(ctx, texObj); - } + fxTexInvalidate(ctx, texObj); } @@ -1829,7 +1796,7 @@ fxDDCompressedTexSubImage2D( GLcontext *ctx, GLenum target, mml->width, (GLubyte*) texImage->Data); - rows = height / 4; /* [dBorca] hardcoded 4, but works for FXT1/DXTC */ + rows = height / 4; /* hardcoded 4, but works for FXT1/DXTC */ for (i = 0; i < rows; i++) { MEMCPY(dest, data, srcRowStride); @@ -1905,9 +1872,7 @@ fxDDTestProxyTexImage (GLcontext *ctx, GLenum target, GLint width, GLint height, GLint depth, GLint border) { - /* [dBorca] - * TODO - maybe through fxTexValidate() - */ + /* XXX todo - maybe through fxTexValidate() */ return _mesa_test_proxy_teximage(ctx, target, level, internalFormat, format, type, diff --git a/src/mesa/drivers/glide/fxdrv.h b/src/mesa/drivers/glide/fxdrv.h index 379851131f..c246444d1c 100644 --- a/src/mesa/drivers/glide/fxdrv.h +++ b/src/mesa/drivers/glide/fxdrv.h @@ -714,6 +714,7 @@ void fxSetupColorMask (GLcontext * ctx); void fxSetupBlend (GLcontext *ctx); void fxSetupDepthTest (GLcontext *ctx); void fxSetupTexture (GLcontext *ctx); +void fxSetupStencil (GLcontext *ctx); /* Flags for software fallback cases */ #define FX_FALLBACK_TEXTURE_MAP 0x0001 diff --git a/src/mesa/drivers/glide/fxglidew.c b/src/mesa/drivers/glide/fxglidew.c index 67d816b627..dd1f7b6ac6 100644 --- a/src/mesa/drivers/glide/fxglidew.c +++ b/src/mesa/drivers/glide/fxglidew.c @@ -210,7 +210,7 @@ FX_grSstQueryHardware(GrHwConfiguration * config) config->SSTs[i].type = GR_SSTTYPE_VOODOO; } - grGet(GR_MEMORY_FB, 4, &result); /* ZZZ: differs after grSstWinOpen */ + grGet(GR_MEMORY_FB, 4, &result); config->SSTs[i].fbRam = result / (1024 * 1024); grGet(GR_NUM_TMU, 4, &result); @@ -220,7 +220,7 @@ FX_grSstQueryHardware(GrHwConfiguration * config) config->SSTs[i].fbiRev = result; for (j = 0; j < config->SSTs[i].nTexelfx; j++) { - grGet(GR_MEMORY_TMU, 4, &result); /* ZZZ: differs after grSstWinOpen */ + grGet(GR_MEMORY_TMU, 4, &result); config->SSTs[i].tmuConfig[j].tmuRam = result / (1024 * 1024); grGet(GR_REVISION_TMU, 4, &result); config->SSTs[i].tmuConfig[j].tmuRev = result; diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c index c211229497..71b66fcc1d 100644 --- a/src/mesa/drivers/glide/fxsetup.c +++ b/src/mesa/drivers/glide/fxsetup.c @@ -76,9 +76,7 @@ fxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj) const GLvoid *srcImage, GLvoid *dstImage ); fxMesaContext fxMesa = FX_CONTEXT(ctx); /* [dBorca] - * Ooooooook! Here's a(nother) long story. - * We get here because we need to handle a texture larger - * than hardware can support. Two cases: + * Fake textures larger than HW supports: * 1) we have mipmaps. Then we just push up to the first supported * LOD. A possible drawback is that Mesa will ignore the skipped * LODs on further texture handling. @@ -88,13 +86,6 @@ fxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj) * once in TexImage2D to accomodate aspect ratio, and now we * are rescaling again. The thing is, in TexImage2D we don't * know whether we'll hit 1) or 2) by the time of validation. - * NB: we could handle mml->[wh]Scale nicely, using (biased) shifts. - * - * Which brings me to another issue. How can we handle NPOT textures? - * - rescaling NPOT to the next bigger POT (mml->[wh]Scale can't shift) - * - upping the max LOD to the next power-of-two, in fxTexGetInfo; then - * choosing non-power-of-two values for ti->[st]Scale... Anyhow, we - * still need to align mipmaps correctly in texture memory! */ if ((tObj->MinFilter == GL_NEAREST) || (tObj->MinFilter == GL_LINEAR)) { /* no mipmaps! */ @@ -155,7 +146,7 @@ fxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj) else FX_smallLodLog2(ti->info) = FX_largeLodLog2(ti->info); - /* this is necessary because of fxDDCompressedTexImage2D */ + /* [dBorca] this is necessary because of fxDDCompressedTexImage2D */ if (ti->padded) { struct gl_texture_image *texImage = tObj->Image[0][minl]; tfxMipMapLevel *mml = FX_MIPMAP_DATA(texImage); @@ -351,9 +342,7 @@ fxSetupSingleTMU_NoLock(fxMesaContext fxMesa, struct gl_texture_object *tObj) fprintf(stderr, "fxSetupSingleTMU_NoLock(%p (%d))\n", (void *)tObj, tObj->Name); } -#if 1 /* [dBorca] Good... bad... I'm the guy with the gun! */ ti->lastTimeUsed = fxMesa->texBindNumber; -#endif /* Make sure we're not loaded incorrectly */ if (ti->isInTM) { @@ -654,10 +643,9 @@ fxSetupTextureSingleTMU_NoLock(GLcontext * ctx, GLuint textureset) colorComb.Factor = GR_COMBINE_FACTOR_TEXTURE_ALPHA; colorComb.Other = GR_COMBINE_OTHER_CONSTANT; } else { - /* [dBorca] Hack alert: - * only Voodoo^2 can GL_BLEND (GR_COMBINE_FACTOR_TEXTURE_RGB) - * These settings assume that the TexEnv color is black - * and incoming fragment color is white. + /* Only Voodoo^2 can GL_BLEND (GR_COMBINE_FACTOR_TEXTURE_RGB) + * These settings assume that the TexEnv color is black and + * incoming fragment color is white. */ colorComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; colorComb.Factor = GR_COMBINE_FACTOR_ONE; @@ -1781,7 +1769,7 @@ fxDDStencilOp (GLcontext *ctx, GLenum sfail, GLenum zfail, GLenum zpass) } } -static void +void fxSetupStencil (GLcontext * ctx) { fxMesaContext fxMesa = FX_CONTEXT(ctx); diff --git a/src/mesa/drivers/glide/fxsetup.h b/src/mesa/drivers/glide/fxsetup.h index 5cec362f61..071b234a54 100644 --- a/src/mesa/drivers/glide/fxsetup.h +++ b/src/mesa/drivers/glide/fxsetup.h @@ -32,8 +32,7 @@ */ /* fxsetup.c - 3Dfx VooDoo rendering mode setup functions */ -/* [dBorca] Hack alert: - * this code belongs to fxsetup.c, but I didn't want to clutter +/* This code belongs to fxsetup.c, but I didn't want to clutter * the original code with Napalm specifics, in order to keep things * clear -- especially for backward compatibility. I should have * put it into another .c file, but I didn't want to export so many @@ -379,9 +378,7 @@ fxSetupTextureEnvNapalm_NoLock(GLcontext * ctx, GLuint textureset, GLuint tmu, G break; /* COMBINE_EXT */ case GL_COMBINE_EXT: - /* [dBorca] Hack alert: - * INCOMPLETE!!! - */ + /* XXX todo - INCOMPLETE!!! */ if (TDFX_DEBUG & (VERBOSE_DRIVER | VERBOSE_TEXTURE)) { #if 1 fprintf(stderr, "COMBINE_EXT: %s + %s\n", @@ -1024,10 +1021,7 @@ fxSelectSingleTMUSrcNapalm_NoLock(fxMesaContext fxMesa, GLint tmu, FxBool LODble } if (LODblend) { - /* [dBorca] Hack alert: - * TODO: GR_CMBX_LOD_FRAC - */ - + /* XXX todo - GR_CMBX_LOD_FRAC? */ fxMesa->tmuSrc = FX_TMU_SPLIT; } else { diff --git a/src/mesa/drivers/glide/fxtexman.c b/src/mesa/drivers/glide/fxtexman.c index 0208d15f3c..d83c7e3a62 100644 --- a/src/mesa/drivers/glide/fxtexman.c +++ b/src/mesa/drivers/glide/fxtexman.c @@ -486,7 +486,7 @@ fxTMMoveInTM_NoLock(fxMesaContext fxMesa, struct gl_texture_object *tObj, /*texmemsize = (int)grTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &(ti->info));*/ ti->tm[FX_TMU1] = fxTMAddObj(fxMesa, tObj, FX_TMU1, texmemsize); - fxMesa->stats.memTexUpload += texmemsize; /* ZZZ: required? */ + fxMesa->stats.memTexUpload += texmemsize; for (i = FX_largeLodValue(ti->info), l = ti->minLevel; i <= FX_smallLodValue(ti->info); i++, l++) { @@ -550,6 +550,7 @@ fxTMReloadMipMapLevel(fxMesaContext fxMesa, struct gl_texture_object *tObj, assert(mml->width > 0); assert(mml->height > 0); assert(mml->glideFormat > 0); + assert(ti->isInTM); if (!ti->validated) { fprintf(stderr, "fxTMReloadMipMapLevel: INTERNAL ERROR: not validated\n"); @@ -558,17 +559,8 @@ fxTMReloadMipMapLevel(fxMesaContext fxMesa, struct gl_texture_object *tObj, } tmu = (int) ti->whichTMU; -#if 0 - /* [dBorca] - * We get here by (see Tex[Sub]Image2D), thus we are in TMU. - * Also, we just set the correct TMU above. fxTMMoveInTM will - * bail early, so don't bother... - */ - fxTMMoveInTM(fxMesa, tObj, tmu); -#else fxMesa->stats.reqTexUpload++; fxMesa->stats.texUpload++; -#endif lodlevel = ti->info.largeLodLog2 - (level - ti->minLevel); diff --git a/src/mesa/drivers/glide/fxvb.c b/src/mesa/drivers/glide/fxvb.c index ddcedfa29f..13bc1b3ecd 100644 --- a/src/mesa/drivers/glide/fxvb.c +++ b/src/mesa/drivers/glide/fxvb.c @@ -695,10 +695,6 @@ void fxBuildVertices( GLcontext *ctx, GLuint start, GLuint count, } else { GLuint ind = 0; - /* [dBorca] masked by VERT_BIT_POS ?!? - if (newinputs & VERT_BIT_POINT_SIZE) - ind |= SETUP_PSIZ;*/ - if (newinputs & VERT_BIT_COLOR0) ind |= SETUP_RGBA; diff --git a/src/mesa/drivers/glide/fxwgl.c b/src/mesa/drivers/glide/fxwgl.c index 109ddbd42e..d9eb342138 100644 --- a/src/mesa/drivers/glide/fxwgl.c +++ b/src/mesa/drivers/glide/fxwgl.c @@ -348,7 +348,7 @@ wglCreateContext(HDC hdc) SetForegroundWindow(hWnd); Sleep(100); /* a hack for win95 */ if (env_check("MESA_GLX_FX", 'w') && !(GetWindowLong (hWnd, GWL_STYLE) & WS_POPUP)) { - /* [dBorca] Hack alert: unfinished business! */ + /* XXX todo - windowed modes */ error = !(ctx = fxMesaCreateContext((GLuint) hWnd, GR_RESOLUTION_NONE, GR_REFRESH_NONE, pix[curPFD - 1].mesaAttr)); } else { GetClientRect(hWnd, &cliRect); @@ -629,7 +629,7 @@ wglGetProcAddress(LPCSTR lpszProc) int i; PROC p = (PROC) _glapi_get_proc_address((const char *) lpszProc); - /* [dBorca] we can't do BlendColor */ + /* we can't BlendColor. work around buggy applications */ if (p && strcmp(lpszProc, "glBlendColor") && strcmp(lpszProc, "glBlendColorEXT")) return p; @@ -860,8 +860,7 @@ wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR * ppfd) if (!(pfd.dwFlags & PFD_DOUBLEBUFFER_DONTCARE) && ((pfd.dwFlags & PFD_DOUBLEBUFFER) != (pix[i].pfd.dwFlags & PFD_DOUBLEBUFFER))) continue; -#if 1 /* [dBorca] Hack alert: Doom3 fails here! - */ +#if 1 /* Doom3 fails here! */ if (!(pfd.dwFlags & PFD_STEREO_DONTCARE) && ((pfd.dwFlags & PFD_STEREO) != (pix[i].pfd.dwFlags & PFD_STEREO))) continue; @@ -873,7 +872,7 @@ wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR * ppfd) if (pfd.cAlphaBits > 0 && pix[i].pfd.cAlphaBits == 0) continue; /* need alpha buffer */ -#if 0 /* [dBorca] regression bug? */ +#if 0 /* regression bug? */ if (pfd.cStencilBits > 0 && pix[i].pfd.cStencilBits == 0) continue; /* need stencil buffer */ #endif |