summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r128
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2004-01-27 16:34:45 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2004-01-27 16:34:45 +0000
commit18fa367ac6e035341f5eb86ecc4231124b2921e3 (patch)
treee0902aabb61e55a785e8742aa809f53dcf5fa16c /src/mesa/drivers/dri/r128
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/r128')
-rw-r--r--src/mesa/drivers/dri/r128/r128_texmem.c2
-rw-r--r--src/mesa/drivers/dri/r128/r128_texstate.c22
2 files changed, 12 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/r128/r128_texmem.c b/src/mesa/drivers/dri/r128/r128_texmem.c
index 7bffaf4628..63ef0f17b4 100644
--- a/src/mesa/drivers/dri/r128/r128_texmem.c
+++ b/src/mesa/drivers/dri/r128/r128_texmem.c
@@ -93,7 +93,7 @@ static void uploadSubImage( r128ContextPtr rmesa, r128TexObjPtr t,
if ( ( level < 0 ) || ( level > R128_MAX_TEXTURE_LEVELS ) )
return;
- image = t->base.tObj->Image[level];
+ image = t->base.tObj->Image[0][level];
if ( !image )
return;
diff --git a/src/mesa/drivers/dri/r128/r128_texstate.c b/src/mesa/drivers/dri/r128/r128_texstate.c
index 3c43eb4528..3965bbdb39 100644
--- a/src/mesa/drivers/dri/r128/r128_texstate.c
+++ b/src/mesa/drivers/dri/r128/r128_texstate.c
@@ -51,7 +51,7 @@ static void r128SetTexImages( r128ContextPtr rmesa,
const struct gl_texture_object *tObj )
{
r128TexObjPtr t = (r128TexObjPtr) tObj->DriverData;
- struct gl_texture_image *baseImage = tObj->Image[tObj->BaseLevel];
+ struct gl_texture_image *baseImage = tObj->Image[0][tObj->BaseLevel];
int log2Pitch, log2Height, log2Size, log2MinSize;
int totalSize;
int i;
@@ -96,8 +96,8 @@ static void r128SetTexImages( r128ContextPtr rmesa,
firstLevel = t->base.firstLevel;
lastLevel = t->base.lastLevel;
- log2Pitch = tObj->Image[firstLevel]->WidthLog2;
- log2Height = tObj->Image[firstLevel]->HeightLog2;
+ log2Pitch = tObj->Image[0][firstLevel]->WidthLog2;
+ log2Height = tObj->Image[0][firstLevel]->HeightLog2;
log2Size = MAX2(log2Pitch, log2Height);
log2MinSize = log2Size;
@@ -106,7 +106,7 @@ static void r128SetTexImages( r128ContextPtr rmesa,
for ( i = firstLevel; i <= lastLevel; i++ ) {
const struct gl_texture_image *texImage;
- texImage = tObj->Image[i];
+ texImage = tObj->Image[0][i];
if ( !texImage || !texImage->Data ) {
lastLevel = i - 1;
break;
@@ -115,14 +115,14 @@ static void r128SetTexImages( r128ContextPtr rmesa,
log2MinSize = texImage->MaxLog2;
t->image[i - firstLevel].offset = totalSize;
- t->image[i - firstLevel].width = tObj->Image[i]->Width;
- t->image[i - firstLevel].height = tObj->Image[i]->Height;
+ t->image[i - firstLevel].width = tObj->Image[0][i]->Width;
+ t->image[i - firstLevel].height = tObj->Image[0][i]->Height;
t->base.dirty_images[0] |= (1 << i);
- totalSize += (tObj->Image[i]->Height *
- tObj->Image[i]->Width *
- tObj->Image[i]->TexFormat->TexelBytes);
+ totalSize += (tObj->Image[0][i]->Height *
+ tObj->Image[0][i]->Width *
+ tObj->Image[0][i]->TexFormat->TexelBytes);
/* Offsets must be 32-byte aligned for host data blits and tiling */
totalSize = (totalSize + 31) & ~31;
@@ -199,7 +199,7 @@ static GLboolean r128UpdateTextureEnv( GLcontext *ctx, int unit )
GLint source = rmesa->tmu_source[unit];
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[source];
const struct gl_texture_object *tObj = texUnit->_Current;
- const GLenum format = tObj->Image[tObj->BaseLevel]->Format;
+ const GLenum format = tObj->Image[0][tObj->BaseLevel]->Format;
GLuint combine;
if ( R128_DEBUG & DEBUG_VERBOSE_API ) {
@@ -535,7 +535,7 @@ static GLboolean update_tex_common( GLcontext *ctx, int unit )
/* 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;
}