summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/tdfx
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2004-01-27 16:34:45 +0000
committerKeith Whitwell <[email protected]>2004-01-27 16:34:45 +0000
commit18fa367ac6e035341f5eb86ecc4231124b2921e3 (patch)
treee0902aabb61e55a785e8742aa809f53dcf5fa16c /src/mesa/drivers/dri/tdfx
parent740f7de085f143b2bb1fe623d68c5efb3560e1a7 (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/dri/tdfx')
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_tex.c20
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_texman.c26
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_texstate.c12
3 files changed, 29 insertions, 29 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tex.c b/src/mesa/drivers/dri/tdfx/tdfx_tex.c
index 515ae7c809a..8c4ea2d46d5 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_tex.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_tex.c
@@ -171,20 +171,20 @@ static void RevalidateTexture(GLcontext *ctx, struct gl_texture_object *tObj)
minl = maxl = tObj->BaseLevel;
- if (tObj->Image[minl]) {
- maxl = MIN2(tObj->MaxLevel, tObj->Image[minl]->MaxLog2);
+ if (tObj->Image[0][minl]) {
+ maxl = MIN2(tObj->MaxLevel, tObj->Image[0][minl]->MaxLog2);
/* compute largeLodLog2, aspect ratio and texcoord scale factors */
- tdfxTexGetInfo(ctx, tObj->Image[minl]->Width, tObj->Image[minl]->Height,
+ tdfxTexGetInfo(ctx, tObj->Image[0][minl]->Width, tObj->Image[0][minl]->Height,
&ti->info.largeLodLog2,
&ti->info.aspectRatioLog2,
&(ti->sScale), &(ti->tScale), NULL, NULL);
}
- if (tObj->Image[maxl] && (tObj->MinFilter != GL_NEAREST) && (tObj->MinFilter != GL_LINEAR)) {
+ if (tObj->Image[0][maxl] && (tObj->MinFilter != GL_NEAREST) && (tObj->MinFilter != GL_LINEAR)) {
/* mipmapping: need to compute smallLodLog2 */
- tdfxTexGetInfo(ctx, tObj->Image[maxl]->Width,
- tObj->Image[maxl]->Height,
+ tdfxTexGetInfo(ctx, tObj->Image[0][maxl]->Width,
+ tObj->Image[0][maxl]->Height,
&ti->info.smallLodLog2, NULL,
NULL, NULL, NULL, NULL);
}
@@ -1282,11 +1282,11 @@ tdfxTestProxyTexImage(GLcontext *ctx, GLenum target,
assert(ti);
/* assign the parameters to test against */
- tObj->Image[level]->Width = width;
- tObj->Image[level]->Height = height;
- tObj->Image[level]->Border = border;
+ tObj->Image[0][level]->Width = width;
+ tObj->Image[0][level]->Height = height;
+ tObj->Image[0][level]->Border = border;
#if 0
- tObj->Image[level]->IntFormat = internalFormat;
+ tObj->Image[0][level]->IntFormat = internalFormat;
#endif
if (level == 0) {
/* don't use mipmap levels > 0 */
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_texman.c b/src/mesa/drivers/dri/tdfx/tdfx_texman.c
index b34779c21fe..9bfd5de5f9e 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_texman.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_texman.c
@@ -655,7 +655,7 @@ tdfxTMDownloadTexture(tdfxContextPtr fxMesa, struct gl_texture_object *tObj)
case TDFX_TMU1:
if (ti->tm[targetTMU]) {
for (l = ti->minLevel; l <= ti->maxLevel
- && tObj->Image[l]->Data; l++) {
+ && tObj->Image[0][l]->Data; l++) {
GrLOD_t glideLod = ti->info.largeLodLog2 - l + tObj->BaseLevel;
fxMesa->Glide.grTexDownloadMipMapLevel(targetTMU,
ti->tm[targetTMU]->startAddr,
@@ -664,14 +664,14 @@ tdfxTMDownloadTexture(tdfxContextPtr fxMesa, struct gl_texture_object *tObj)
ti->info.aspectRatioLog2,
ti->info.format,
GR_MIPMAPLEVELMASK_BOTH,
- tObj->Image[l]->Data);
+ tObj->Image[0][l]->Data);
}
}
break;
case TDFX_TMU_SPLIT:
if (ti->tm[TDFX_TMU0] && ti->tm[TDFX_TMU1]) {
for (l = ti->minLevel; l <= ti->maxLevel
- && tObj->Image[l]->Data; l++) {
+ && tObj->Image[0][l]->Data; l++) {
GrLOD_t glideLod = ti->info.largeLodLog2 - l + tObj->BaseLevel;
fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU0,
ti->tm[TDFX_TMU0]->startAddr,
@@ -680,7 +680,7 @@ tdfxTMDownloadTexture(tdfxContextPtr fxMesa, struct gl_texture_object *tObj)
ti->info.aspectRatioLog2,
ti->info.format,
GR_MIPMAPLEVELMASK_ODD,
- tObj->Image[l]->Data);
+ tObj->Image[0][l]->Data);
fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU1,
ti->tm[TDFX_TMU1]->startAddr,
@@ -689,14 +689,14 @@ tdfxTMDownloadTexture(tdfxContextPtr fxMesa, struct gl_texture_object *tObj)
ti->info.aspectRatioLog2,
ti->info.format,
GR_MIPMAPLEVELMASK_EVEN,
- tObj->Image[l]->Data);
+ tObj->Image[0][l]->Data);
}
}
break;
case TDFX_TMU_BOTH:
if (ti->tm[TDFX_TMU0] && ti->tm[TDFX_TMU1]) {
for (l = ti->minLevel; l <= ti->maxLevel
- && tObj->Image[l]->Data; l++) {
+ && tObj->Image[0][l]->Data; l++) {
GrLOD_t glideLod = ti->info.largeLodLog2 - l + tObj->BaseLevel;
fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU0,
ti->tm[TDFX_TMU0]->startAddr,
@@ -705,7 +705,7 @@ tdfxTMDownloadTexture(tdfxContextPtr fxMesa, struct gl_texture_object *tObj)
ti->info.aspectRatioLog2,
ti->info.format,
GR_MIPMAPLEVELMASK_BOTH,
- tObj->Image[l]->Data);
+ tObj->Image[0][l]->Data);
fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU1,
ti->tm[TDFX_TMU1]->startAddr,
@@ -714,7 +714,7 @@ tdfxTMDownloadTexture(tdfxContextPtr fxMesa, struct gl_texture_object *tObj)
ti->info.aspectRatioLog2,
ti->info.format,
GR_MIPMAPLEVELMASK_BOTH,
- tObj->Image[l]->Data);
+ tObj->Image[0][l]->Data);
}
}
break;
@@ -750,7 +750,7 @@ tdfxTMReloadMipMapLevel(GLcontext *ctx, struct gl_texture_object *tObj,
ti->info.aspectRatioLog2,
ti->info.format,
GR_MIPMAPLEVELMASK_BOTH,
- tObj->Image[level]->Data);
+ tObj->Image[0][level]->Data);
break;
case TDFX_TMU_SPLIT:
fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU0,
@@ -760,7 +760,7 @@ tdfxTMReloadMipMapLevel(GLcontext *ctx, struct gl_texture_object *tObj,
ti->info.aspectRatioLog2,
ti->info.format,
GR_MIPMAPLEVELMASK_ODD,
- tObj->Image[level]->Data);
+ tObj->Image[0][level]->Data);
fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU1,
ti->tm[GR_TMU1]->startAddr,
@@ -769,7 +769,7 @@ tdfxTMReloadMipMapLevel(GLcontext *ctx, struct gl_texture_object *tObj,
ti->info.aspectRatioLog2,
ti->info.format,
GR_MIPMAPLEVELMASK_EVEN,
- tObj->Image[level]->Data);
+ tObj->Image[0][level]->Data);
break;
case TDFX_TMU_BOTH:
fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU0,
@@ -779,7 +779,7 @@ tdfxTMReloadMipMapLevel(GLcontext *ctx, struct gl_texture_object *tObj,
ti->info.aspectRatioLog2,
ti->info.format,
GR_MIPMAPLEVELMASK_BOTH,
- tObj->Image[level]->Data);
+ tObj->Image[0][level]->Data);
fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU1,
ti->tm[GR_TMU1]->startAddr,
@@ -788,7 +788,7 @@ tdfxTMReloadMipMapLevel(GLcontext *ctx, struct gl_texture_object *tObj,
ti->info.aspectRatioLog2,
ti->info.format,
GR_MIPMAPLEVELMASK_BOTH,
- tObj->Image[level]->Data);
+ tObj->Image[0][level]->Data);
break;
default:
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_texstate.c b/src/mesa/drivers/dri/tdfx/tdfx_texstate.c
index e20938bf282..318d3a1c8f0 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_texstate.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_texstate.c
@@ -1483,8 +1483,8 @@ static void print_state(tdfxContextPtr fxMesa)
GLcontext *ctx = fxMesa->glCtx;
struct gl_texture_object *tObj0 = ctx->Texture.Unit[0].Current2D;
struct gl_texture_object *tObj1 = ctx->Texture.Unit[1].Current2D;
- GLenum base0 = tObj0->Image[tObj0->BaseLevel] ? tObj0->Image[tObj0->BaseLevel]->Format : 99;
- GLenum base1 = tObj1->Image[tObj1->BaseLevel] ? tObj1->Image[tObj1->BaseLevel]->Format : 99;
+ GLenum base0 = tObj0->Image[0][tObj0->BaseLevel] ? tObj0->Image[0][tObj0->BaseLevel]->Format : 99;
+ GLenum base1 = tObj1->Image[0][tObj1->BaseLevel] ? tObj1->Image[0][tObj1->BaseLevel]->Format : 99;
printf("Unit 0: Enabled: GL=%d Gr=%d\n", ctx->Texture.Unit[0]._ReallyEnabled,
fxMesa->TexState.Enabled[0]);
@@ -1517,7 +1517,7 @@ static void setupTextureSingleTMU(GLcontext * ctx, GLuint unit)
GLenum envMode, baseFormat;
tObj = ctx->Texture.Unit[unit].Current2D;
- if (tObj->Image[tObj->BaseLevel]->Border > 0) {
+ if (tObj->Image[0][tObj->BaseLevel]->Border > 0) {
FALLBACK(fxMesa, TDFX_FALLBACK_TEXTURE_BORDER, GL_TRUE);
return;
}
@@ -1539,7 +1539,7 @@ static void setupTextureSingleTMU(GLcontext * ctx, GLuint unit)
/* Check if we really need to update the texenv state */
envMode = ctx->Texture.Unit[unit].EnvMode;
- baseFormat = tObj->Image[tObj->BaseLevel]->Format;
+ baseFormat = tObj->Image[0][tObj->BaseLevel]->Format;
if (TDFX_IS_NAPALM(fxMesa)) {
/* see if we really need to update the unit */
@@ -1826,8 +1826,8 @@ static void setupTextureDoubleTMU(GLcontext * ctx)
struct gl_texture_object *tObj1 = ctx->Texture.Unit[1].Current2D;
tdfxTexInfo *ti0 = TDFX_TEXTURE_DATA(tObj0);
tdfxTexInfo *ti1 = TDFX_TEXTURE_DATA(tObj1);
- struct gl_texture_image *baseImage0 = tObj0->Image[tObj0->BaseLevel];
- struct gl_texture_image *baseImage1 = tObj1->Image[tObj1->BaseLevel];
+ struct gl_texture_image *baseImage0 = tObj0->Image[0][tObj0->BaseLevel];
+ struct gl_texture_image *baseImage1 = tObj1->Image[0][tObj1->BaseLevel];
const GLenum envMode0 = ctx->Texture.Unit[0].EnvMode;
const GLenum envMode1 = ctx->Texture.Unit[1].EnvMode;