diff options
Diffstat (limited to 'src/mesa/drivers/dri/i810/i810texstate.c')
-rw-r--r-- | src/mesa/drivers/dri/i810/i810texstate.c | 18 |
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 ); } } |