summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/mga
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/mga
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/mga')
-rw-r--r--src/mesa/drivers/dri/mga/mga_texstate.c20
-rw-r--r--src/mesa/drivers/dri/mga/mgatexmem.c2
2 files changed, 11 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/mga/mga_texstate.c b/src/mesa/drivers/dri/mga/mga_texstate.c
index e22a69e052c..5f63d5ca463 100644
--- a/src/mesa/drivers/dri/mga/mga_texstate.c
+++ b/src/mesa/drivers/dri/mga/mga_texstate.c
@@ -65,7 +65,7 @@ mgaSetTexImages( mgaContextPtr mmesa,
const struct gl_texture_object * tObj )
{
mgaTextureObjectPtr t = (mgaTextureObjectPtr) tObj->DriverData;
- struct gl_texture_image *baseImage = tObj->Image[ tObj->BaseLevel ];
+ struct gl_texture_image *baseImage = tObj->Image[0][ tObj->BaseLevel ];
GLint totalSize;
GLint width, height;
GLint i;
@@ -110,12 +110,12 @@ mgaSetTexImages( mgaContextPtr mmesa,
log2Width = 0;
log2Height = 0;
} else {
- log2Width = tObj->Image[t->base.firstLevel]->WidthLog2;
- log2Height = tObj->Image[t->base.firstLevel]->HeightLog2;
+ log2Width = tObj->Image[0][t->base.firstLevel]->WidthLog2;
+ log2Height = tObj->Image[0][t->base.firstLevel]->HeightLog2;
}
- width = tObj->Image[t->base.firstLevel]->Width;
- height = tObj->Image[t->base.firstLevel]->Height;
+ width = tObj->Image[0][t->base.firstLevel]->Width;
+ height = tObj->Image[0][t->base.firstLevel]->Height;
numLevels = MIN2( t->base.lastLevel - t->base.firstLevel + 1,
MGA_IS_G200(mmesa) ? G200_TEX_MAXLEVELS : G400_TEX_MAXLEVELS);
@@ -124,7 +124,7 @@ mgaSetTexImages( mgaContextPtr mmesa,
totalSize = 0;
for ( i = 0 ; i < numLevels ; i++ ) {
const struct gl_texture_image * const texImage =
- tObj->Image[ i + t->base.firstLevel ];
+ tObj->Image[0][ i + t->base.firstLevel ];
int size;
if (texImage == NULL)
@@ -204,7 +204,7 @@ static void mgaUpdateTextureEnvG200( GLcontext *ctx, GLuint unit )
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
struct gl_texture_object *tObj = ctx->Texture.Unit[0]._Current;
mgaTextureObjectPtr t = (mgaTextureObjectPtr) tObj->DriverData;
- GLenum format = tObj->Image[tObj->BaseLevel]->Format;
+ GLenum format = tObj->Image[0][tObj->BaseLevel]->Format;
if (tObj != ctx->Texture.Unit[0].Current2D &&
tObj != ctx->Texture.Unit[0].CurrentRect)
@@ -536,7 +536,7 @@ static GLboolean mgaUpdateTextureEnvBlend( GLcontext *ctx, int unit )
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[source];
const struct gl_texture_object *tObj = texUnit->_Current;
GLuint *reg = ((GLuint *)&mmesa->setup.tdualstage0 + unit);
- GLenum format = tObj->Image[tObj->BaseLevel]->Format;
+ GLenum format = tObj->Image[0][tObj->BaseLevel]->Format;
*reg = 0;
@@ -633,7 +633,7 @@ static void mgaUpdateTextureEnvG400( GLcontext *ctx, GLuint unit )
const struct gl_texture_object *tObj = texUnit->_Current;
GLuint *reg = ((GLuint *)&mmesa->setup.tdualstage0 + unit);
mgaTextureObjectPtr t = (mgaTextureObjectPtr) tObj->DriverData;
- GLenum format = tObj->Image[tObj->BaseLevel]->Format;
+ GLenum format = tObj->Image[0][tObj->BaseLevel]->Format;
if (tObj != ctx->Texture.Unit[source].Current2D &&
tObj != ctx->Texture.Unit[source].CurrentRect)
@@ -780,7 +780,7 @@ static GLboolean update_tex_common( GLcontext *ctx, int unit )
mgaTextureObjectPtr t = (mgaTextureObjectPtr) tObj->DriverData;
/* Fallback if there's a texture border */
- if ( tObj->Image[tObj->BaseLevel]->Border > 0 ) {
+ if ( tObj->Image[0][tObj->BaseLevel]->Border > 0 ) {
return GL_FALSE;
}
diff --git a/src/mesa/drivers/dri/mga/mgatexmem.c b/src/mesa/drivers/dri/mga/mgatexmem.c
index 66c69bf3e5e..01acb9ee736 100644
--- a/src/mesa/drivers/dri/mga/mgatexmem.c
+++ b/src/mesa/drivers/dri/mga/mgatexmem.c
@@ -105,7 +105,7 @@ static void mgaUploadSubImage( mgaContextPtr mmesa,
return;
}
- texImage = t->base.tObj->Image[level];
+ texImage = t->base.tObj->Image[0][level];
if ( texImage == NULL ) {
fprintf( stderr, "[%s:%d] Image[%d] = NULL\n", __FILE__, __LINE__,
level );