#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
}
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);
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) {
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
#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; \
#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; \
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;
}
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);
}
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);
}
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);
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,
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
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);
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;
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.
* 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! */
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);
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) {
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;
}
}
-static void
+void
fxSetupStencil (GLcontext * ctx)
{
fxMesaContext fxMesa = FX_CONTEXT(ctx);
*/
/* 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
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",
}
if (LODblend) {
- /* [dBorca] Hack alert:
- * TODO: GR_CMBX_LOD_FRAC
- */
-
+ /* XXX todo - GR_CMBX_LOD_FRAC? */
fxMesa->tmuSrc = FX_TMU_SPLIT;
}
else {
/*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++) {
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");
}
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);
} 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;
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);
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;
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;
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