summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i830
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/i830
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/i830')
-rw-r--r--src/mesa/drivers/dri/i830/i830_texstate.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i830/i830_texstate.c b/src/mesa/drivers/dri/i830/i830_texstate.c
index 34f13d81338..8e93a5b8fef 100644
--- a/src/mesa/drivers/dri/i830/i830_texstate.c
+++ b/src/mesa/drivers/dri/i830/i830_texstate.c
@@ -61,7 +61,7 @@ static void i830SetTexImages( i830ContextPtr imesa,
{
GLuint total_height, pitch, i, textureFormat;
i830TextureObjectPtr t = (i830TextureObjectPtr) 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;
switch( baseImage->TexFormat->MesaFormat ) {
@@ -135,11 +135,11 @@ static void i830SetTexImages( i830ContextPtr imesa,
*/
if (0) {
pitch = 128;
- while (pitch < tObj->Image[t->base.firstLevel]->Width * t->texelBytes)
+ while (pitch < tObj->Image[0][t->base.firstLevel]->Width * t->texelBytes)
pitch *= 2;
}
else {
- pitch = tObj->Image[t->base.firstLevel]->Width * t->texelBytes;
+ pitch = tObj->Image[0][t->base.firstLevel]->Width * t->texelBytes;
pitch = (pitch + 3) & ~3;
}
@@ -148,7 +148,7 @@ static void i830SetTexImages( i830ContextPtr imesa,
* lines required:
*/
for ( total_height = i = 0 ; i < numLevels ; i++ ) {
- t->image[0][i].image = tObj->Image[t->base.firstLevel + i];
+ t->image[0][i].image = tObj->Image[0][t->base.firstLevel + i];
if (!t->image[0][i].image)
break;
@@ -160,8 +160,8 @@ static void i830SetTexImages( i830ContextPtr imesa,
t->Pitch = pitch;
t->base.totalSize = total_height*pitch;
t->Setup[I830_TEXREG_TM0S1] =
- (((tObj->Image[t->base.firstLevel]->Height - 1) << TM0S1_HEIGHT_SHIFT) |
- ((tObj->Image[t->base.firstLevel]->Width - 1) << TM0S1_WIDTH_SHIFT) |
+ (((tObj->Image[0][t->base.firstLevel]->Height - 1) << TM0S1_HEIGHT_SHIFT) |
+ ((tObj->Image[0][t->base.firstLevel]->Width - 1) << TM0S1_WIDTH_SHIFT) |
textureFormat);
t->Setup[I830_TEXREG_TM0S2] =
((((pitch / 4) - 1) << TM0S2_PITCH_SHIFT));
@@ -1328,7 +1328,7 @@ static GLboolean enable_tex_common( GLcontext *ctx, GLuint unit )
i830TextureObjectPtr t = (i830TextureObjectPtr)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;
}
@@ -1366,9 +1366,9 @@ static GLboolean enable_tex_common( GLcontext *ctx, GLuint unit )
* missed (need to update last stage flag?). Call
* i830UpdateTexEnv always.
*/
- if (tObj->Image[tObj->BaseLevel]->Format !=
+ if (tObj->Image[0][tObj->BaseLevel]->Format !=
imesa->TexEnvImageFmt[unit]) {
- imesa->TexEnvImageFmt[unit] = tObj->Image[tObj->BaseLevel]->Format;
+ imesa->TexEnvImageFmt[unit] = tObj->Image[0][tObj->BaseLevel]->Format;
}
i830UpdateTexEnv( ctx, unit );
imesa->TexEnabledMask |= I830_TEX_UNIT_ENABLED(unit);