diff options
author | Keith Whitwell <[email protected]> | 2004-01-27 16:34:45 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2004-01-27 16:34:45 +0000 |
commit | 18fa367ac6e035341f5eb86ecc4231124b2921e3 (patch) | |
tree | e0902aabb61e55a785e8742aa809f53dcf5fa16c /src/mesa/drivers/glide | |
parent | 740f7de085f143b2bb1fe623d68c5efb3560e1a7 (diff) |
Consolidate texObj->Pos/Neg/X/Y/Z and texObj->Image into a single
array, texObj->Image[face][level].
Diffstat (limited to 'src/mesa/drivers/glide')
-rw-r--r-- | src/mesa/drivers/glide/fxdd.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxddtex.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxsetup.c | 12 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxtexman.c | 12 |
4 files changed, 16 insertions, 16 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index 447fbfa8819..bda11f9644f 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -1575,7 +1575,7 @@ fx_check_IsInHardware(GLcontext * ctx) ctx->Texture.Unit[0].EnvColor[3] != 1)) { return FX_FALLBACK_TEXTURE_ENV; } - if (ctx->Texture.Unit[0]._Current->Image[0]->Border > 0) + if (ctx->Texture.Unit[0]._Current->Image[0][0]->Border > 0) return FX_FALLBACK_TEXTURE_BORDER; } @@ -1583,7 +1583,7 @@ fx_check_IsInHardware(GLcontext * ctx) if (fxMesa->type < GR_SSTTYPE_Voodoo2) if (ctx->Texture.Unit[1].EnvMode == GL_BLEND) return FX_FALLBACK_TEXTURE_ENV; - if (ctx->Texture.Unit[1]._Current->Image[0]->Border > 0) + if (ctx->Texture.Unit[1]._Current->Image[0][0]->Border > 0) return FX_FALLBACK_TEXTURE_BORDER; } diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c index f1dd2dd3874..437d76f0d77 100644 --- a/src/mesa/drivers/glide/fxddtex.c +++ b/src/mesa/drivers/glide/fxddtex.c @@ -56,8 +56,8 @@ fxPrintTextureData(tfxTexInfo * ti) fprintf(stderr, "\tName: %d\n", ti->tObj->Name); fprintf(stderr, "\tBaseLevel: %d\n", ti->tObj->BaseLevel); fprintf(stderr, "\tSize: %d x %d\n", - ti->tObj->Image[ti->tObj->BaseLevel]->Width, - ti->tObj->Image[ti->tObj->BaseLevel]->Height); + ti->tObj->Image[0][ti->tObj->BaseLevel]->Width, + ti->tObj->Image[0][ti->tObj->BaseLevel]->Height); } else fprintf(stderr, "\tName: UNNAMED\n"); diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c index cdfef475564..4c086302843 100644 --- a/src/mesa/drivers/glide/fxsetup.c +++ b/src/mesa/drivers/glide/fxsetup.c @@ -63,7 +63,7 @@ fxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj) ti->tObj = tObj; minl = ti->minLevel = tObj->BaseLevel; - maxl = ti->maxLevel = MIN2(tObj->MaxLevel, tObj->Image[0]->MaxLog2); + maxl = ti->maxLevel = MIN2(tObj->MaxLevel, tObj->Image[0][0]->MaxLog2); #if 1||FX_RESCALE_BIG_TEXURES { @@ -110,7 +110,7 @@ fxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj) */ if ((tObj->MinFilter == GL_NEAREST) || (tObj->MinFilter == GL_LINEAR)) { /* no mipmaps! need to rescale */ - struct gl_texture_image *texImage = tObj->Image[minl]; + struct gl_texture_image *texImage = tObj->Image[0][minl]; tfxMipMapLevel *mml = FX_MIPMAP_DATA(texImage); GLint texelBytes = texImage->TexFormat->TexelBytes; GLvoid *texImage_Data = texImage->Data; @@ -134,7 +134,7 @@ fxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj) MESA_PBUFFER_FREE(texImage_Data); mml->width = _w; mml->height = _h; - maxl = ti->maxLevel = tObj->Image[0]->MaxLog2 = minl + fxMesa->textureMaxLod; + maxl = ti->maxLevel = tObj->Image[0][0]->MaxLog2 = minl + fxMesa->textureMaxLod; } else { /* skip a certain number of LODs */ minl += maxl - fxMesa->textureMaxLod; @@ -147,19 +147,19 @@ fxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj) } #endif - fxTexGetInfo(tObj->Image[minl]->Width, tObj->Image[minl]->Height, + fxTexGetInfo(tObj->Image[0][minl]->Width, tObj->Image[0][minl]->Height, &(FX_largeLodLog2(ti->info)), &(FX_aspectRatioLog2(ti->info)), &(ti->sScale), &(ti->tScale), NULL, NULL); if ((tObj->MinFilter != GL_NEAREST) && (tObj->MinFilter != GL_LINEAR)) - fxTexGetInfo(tObj->Image[maxl]->Width, tObj->Image[maxl]->Height, + fxTexGetInfo(tObj->Image[0][maxl]->Width, tObj->Image[0][maxl]->Height, &(FX_smallLodLog2(ti->info)), NULL, NULL, NULL, NULL, NULL); else FX_smallLodLog2(ti->info) = FX_largeLodLog2(ti->info); - ti->baseLevelInternalFormat = tObj->Image[minl]->Format; + ti->baseLevelInternalFormat = tObj->Image[0][minl]->Format; ti->validated = GL_TRUE; diff --git a/src/mesa/drivers/glide/fxtexman.c b/src/mesa/drivers/glide/fxtexman.c index 66f6f443e14..5a6f18a1690 100644 --- a/src/mesa/drivers/glide/fxtexman.c +++ b/src/mesa/drivers/glide/fxtexman.c @@ -442,7 +442,7 @@ fxTMMoveInTM_NoLock(fxMesaContext fxMesa, struct gl_texture_object *tObj, for (i = FX_largeLodValue(ti->info), l = ti->minLevel; i <= FX_smallLodValue(ti->info); i++, l++) { - struct gl_texture_image *texImage = tObj->Image[l]; + struct gl_texture_image *texImage = tObj->Image[0][l]; grTexDownloadMipMapLevel(where, ti->tm[where]->startAddr, FX_valueToLod(i), @@ -464,7 +464,7 @@ fxTMMoveInTM_NoLock(fxMesaContext fxMesa, struct gl_texture_object *tObj, for (i = FX_largeLodValue(ti->info), l = ti->minLevel; i <= FX_smallLodValue(ti->info); i++, l++) { - struct gl_texture_image *texImage = tObj->Image[l]; + struct gl_texture_image *texImage = tObj->Image[0][l]; grTexDownloadMipMapLevel(GR_TMU0, ti->tm[FX_TMU0]->startAddr, @@ -496,7 +496,7 @@ fxTMMoveInTM_NoLock(fxMesaContext fxMesa, struct gl_texture_object *tObj, for (i = FX_largeLodValue(ti->info), l = ti->minLevel; i <= FX_smallLodValue(ti->info); i++, l++) { - struct gl_texture_image *texImage = tObj->Image[l]; + struct gl_texture_image *texImage = tObj->Image[0][l]; grTexDownloadMipMapLevel(GR_TMU0, ti->tm[FX_TMU0]->startAddr, FX_valueToLod(i), @@ -545,7 +545,7 @@ fxTMReloadMipMapLevel(fxMesaContext fxMesa, struct gl_texture_object *tObj, tfxTexInfo *ti = fxTMGetTexInfo(tObj); GrLOD_t lodlevel; GLint tmu; - struct gl_texture_image *texImage = tObj->Image[level]; + struct gl_texture_image *texImage = tObj->Image[0][level]; tfxMipMapLevel *mml = FX_MIPMAP_DATA(texImage); if (TDFX_DEBUG & VERBOSE_TEXTURE) { @@ -640,7 +640,7 @@ fxTMReloadSubMipMapLevel(fxMesaContext fxMesa, GrLOD_t lodlevel; unsigned short *data; GLint tmu; - struct gl_texture_image *texImage = tObj->Image[level]; + struct gl_texture_image *texImage = tObj->Image[0][level]; tfxMipMapLevel *mml = FX_MIPMAP_DATA(texImage); assert(mml); @@ -771,7 +771,7 @@ fxTMFreeTexture(fxMesaContext fxMesa, struct gl_texture_object *tObj) fxTMMoveOutTM(fxMesa, tObj); for (i = 0; i < MAX_TEXTURE_LEVELS; i++) { - struct gl_texture_image *texImage = tObj->Image[i]; + struct gl_texture_image *texImage = tObj->Image[0][i]; if (texImage) { if (texImage->DriverData) { FREE(texImage->DriverData); |