summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i810/i810texstate.c
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/i810/i810texstate.c
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/i810/i810texstate.c')
-rw-r--r--src/mesa/drivers/dri/i810/i810texstate.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i810/i810texstate.c b/src/mesa/drivers/dri/i810/i810texstate.c
index 05f685c5881..e100c565cbf 100644
--- a/src/mesa/drivers/dri/i810/i810texstate.c
+++ b/src/mesa/drivers/dri/i810/i810texstate.c
@@ -46,7 +46,7 @@ static void i810SetTexImages( i810ContextPtr imesa,
{
GLuint height, width, pitch, i, textureFormat, log_pitch;
i810TextureObjectPtr t = (i810TextureObjectPtr) tObj->DriverData;
- const struct gl_texture_image *baseImage = tObj->Image[tObj->BaseLevel];
+ const struct gl_texture_image *baseImage = tObj->Image[0][tObj->BaseLevel];
GLint numLevels;
GLint log2Width, log2Height;
@@ -84,14 +84,14 @@ static void i810SetTexImages( i810ContextPtr imesa,
numLevels = t->base.lastLevel - t->base.firstLevel + 1;
- 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;
/* Figure out the amount of memory required to hold all the mipmap
* levels. Choose the smallest pitch to accomodate the largest
* mipmap:
*/
- width = tObj->Image[t->base.firstLevel]->Width * t->texelBytes;
+ width = tObj->Image[0][t->base.firstLevel]->Width * t->texelBytes;
for (pitch = 32, log_pitch=2 ; pitch < width ; pitch *= 2 )
log_pitch++;
@@ -99,7 +99,7 @@ static void i810SetTexImages( i810ContextPtr imesa,
* lines required:
*/
for ( height = i = 0 ; i < numLevels ; i++ ) {
- t->image[i].image = tObj->Image[t->base.firstLevel + i];
+ t->image[i].image = tObj->Image[0][t->base.firstLevel + i];
t->image[i].offset = height * pitch;
t->image[i].internalFormat = baseImage->Format;
height += t->image[i].image->Height;
@@ -553,7 +553,7 @@ static void i810UpdateTexEnv( GLcontext *ctx, GLuint unit )
i810ContextPtr imesa = I810_CONTEXT(ctx);
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
const struct gl_texture_object *tObj = texUnit->_Current;
- const GLuint format = tObj->Image[tObj->BaseLevel]->Format;
+ const GLuint format = tObj->Image[0][tObj->BaseLevel]->Format;
GLuint color_combine, alpha_combine;
switch (texUnit->EnvMode) {
@@ -692,7 +692,7 @@ static void i810UpdateTexUnit( GLcontext *ctx, GLuint unit )
}
}
- if (tObj->Image[tObj->BaseLevel]->Border > 0) {
+ if (tObj->Image[0][tObj->BaseLevel]->Border > 0) {
FALLBACK( imesa, I810_FALLBACK_TEXTURE, GL_TRUE );
return;
}
@@ -712,8 +712,8 @@ static void i810UpdateTexUnit( GLcontext *ctx, GLuint unit )
/* Update texture environment if texture object image format or
* texture environment state has changed.
*/
- if (tObj->Image[tObj->BaseLevel]->Format != imesa->TexEnvImageFmt[unit]) {
- imesa->TexEnvImageFmt[unit] = tObj->Image[tObj->BaseLevel]->Format;
+ if (tObj->Image[0][tObj->BaseLevel]->Format != imesa->TexEnvImageFmt[unit]) {
+ imesa->TexEnvImageFmt[unit] = tObj->Image[0][tObj->BaseLevel]->Format;
i810UpdateTexEnv( ctx, unit );
}
}