diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2005-10-05 01:48:07 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2005-10-05 01:48:07 +0000 |
commit | a9fc8ba756dd25a07dc19058fe60f65bda82a055 (patch) | |
tree | aa863fa82d93ea468d6c16e3db6fa74ad1ffb5cb /src/mesa/drivers | |
parent | 91802fdf730451aaa0246f514f6778ffaef92c50 (diff) |
In gl_texture_image replace IntFormat with InternalFormat and Format with
_BaseFormat to be consistant with gl_renderbuffer.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i810/i810texstate.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i830/i830_texstate.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/i830_texstate.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_texprog.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_texstate.c | 12 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_tex.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/mach64/mach64_texstate.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/mga/mga_texstate.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r128/r128_texstate.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_texstate.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texstate.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/s3v/s3v_texmem.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/s3v/s3v_texstate.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/savage/savagetex.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/sis/sis_tex.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_tex.c | 32 | ||||
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_texstate.c | 24 | ||||
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_tex.c | 5 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxddtex.c | 33 |
19 files changed, 88 insertions, 85 deletions
diff --git a/src/mesa/drivers/dri/i810/i810texstate.c b/src/mesa/drivers/dri/i810/i810texstate.c index 6b6d1d727f..5133ea44d4 100644 --- a/src/mesa/drivers/dri/i810/i810texstate.c +++ b/src/mesa/drivers/dri/i810/i810texstate.c @@ -106,7 +106,7 @@ static void i810SetTexImages( i810ContextPtr imesa, for ( height = i = 0 ; i < numLevels ; i++ ) { t->image[i].image = tObj->Image[0][t->base.firstLevel + i]; t->image[i].offset = height * pitch; - t->image[i].internalFormat = baseImage->Format; + t->image[i].internalFormat = baseImage->_BaseFormat; height += t->image[i].image->Height; } @@ -591,7 +591,7 @@ static void i810UpdateTexUnit( GLcontext *ctx, GLuint unit, * texture environment state has changed. */ - imesa->TexEnvImageFmt[unit] = tObj->Image[0][tObj->BaseLevel]->Format; + imesa->TexEnvImageFmt[unit] = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; } else { imesa->CurrentTexObj[unit] = 0; diff --git a/src/mesa/drivers/dri/i830/i830_texstate.c b/src/mesa/drivers/dri/i830/i830_texstate.c index 358c554f3b..a11ae7660a 100644 --- a/src/mesa/drivers/dri/i830/i830_texstate.c +++ b/src/mesa/drivers/dri/i830/i830_texstate.c @@ -185,7 +185,7 @@ static void i830SetTexImages( i830ContextPtr imesa, } else total_height += t->image[0][i].image->Height; - t->image[0][i].internalFormat = baseImage->Format; + t->image[0][i].internalFormat = baseImage->_BaseFormat; } t->Pitch = pitch; @@ -586,9 +586,9 @@ static GLboolean enable_tex_common( GLcontext *ctx, GLuint unit ) * missed (need to update last stage flag?). Call * i830UpdateTexEnv always. */ - if (tObj->Image[0][tObj->BaseLevel]->Format != + if (tObj->Image[0][tObj->BaseLevel]->_BaseFormat != imesa->TexEnvImageFmt[unit]) { - imesa->TexEnvImageFmt[unit] = tObj->Image[0][tObj->BaseLevel]->Format; + imesa->TexEnvImageFmt[unit] = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; } i830UpdateTexEnv( ctx, unit ); imesa->TexEnabledMask |= I830_TEX_UNIT_ENABLED(unit); diff --git a/src/mesa/drivers/dri/i915/i830_texstate.c b/src/mesa/drivers/dri/i915/i830_texstate.c index 55a5a17403..ba972dac8f 100644 --- a/src/mesa/drivers/dri/i915/i830_texstate.c +++ b/src/mesa/drivers/dri/i915/i830_texstate.c @@ -199,7 +199,7 @@ static GLboolean i830SetTexImages( i830ContextPtr i830, t->intel.image[face][i].offset = y * pitch + x * t->intel.texelBytes; - t->intel.image[face][i].internalFormat = baseImage->Format; + t->intel.image[face][i].internalFormat = baseImage->_BaseFormat; d >>= 1; x += step_offsets[face][0] * d; @@ -219,7 +219,7 @@ static GLboolean i830SetTexImages( i830ContextPtr i830, break; t->intel.image[0][i].offset = total_height * pitch; - t->intel.image[0][i].internalFormat = baseImage->Format; + t->intel.image[0][i].internalFormat = baseImage->_BaseFormat; if (t->intel.image[0][i].image->IsCompressed) { if (t->intel.image[0][i].image->Height > 4) diff --git a/src/mesa/drivers/dri/i915/i915_texprog.c b/src/mesa/drivers/dri/i915/i915_texprog.c index 3eaf53d7d5..74ece96f8b 100644 --- a/src/mesa/drivers/dri/i915/i915_texprog.c +++ b/src/mesa/drivers/dri/i915/i915_texprog.c @@ -291,7 +291,7 @@ static GLuint emit_texenv( struct i915_fragment_program *p, int unit ) struct gl_texture_unit *texUnit = &p->ctx->Texture.Unit[unit]; GLenum envMode = texUnit->EnvMode; struct gl_texture_object *tObj = texUnit->_Current; - GLenum format = tObj->Image[0][tObj->BaseLevel]->Format; + GLenum format = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; GLuint saturate = unit < p->last_tex_stage ? A0_DEST_SATURATE : 0; switch(envMode) { diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c index 22f38a9239..efd6fc9450 100644 --- a/src/mesa/drivers/dri/i915/i915_texstate.c +++ b/src/mesa/drivers/dri/i915/i915_texstate.c @@ -115,7 +115,7 @@ static void i915LayoutTextureImages( i915ContextPtr i915, t->intel.image[face][i].offset = y * pitch + x * t->intel.texelBytes; - t->intel.image[face][i].internalFormat = baseImage->Format; + t->intel.image[face][i].internalFormat = baseImage->_BaseFormat; d >>= 1; x += step_offsets[face][0] * d; @@ -144,7 +144,7 @@ static void i915LayoutTextureImages( i915ContextPtr i915, t->intel.image[0][i].image = tObj->Image[0][firstLevel + i]; if (t->intel.image[0][i].image) { t->intel.image[0][i].offset = total_height * pitch; - t->intel.image[0][i].internalFormat = baseImage->Format; + t->intel.image[0][i].internalFormat = baseImage->_BaseFormat; } total_height += MAX2(2, virtual_height); @@ -171,7 +171,7 @@ static void i915LayoutTextureImages( i915ContextPtr i915, break; t->intel.image[0][i].offset = total_height * pitch; - t->intel.image[0][i].internalFormat = baseImage->Format; + t->intel.image[0][i].internalFormat = baseImage->_BaseFormat; if (t->intel.image[0][i].image->IsCompressed) { if (t->intel.image[0][i].image->Height > 4) @@ -266,7 +266,7 @@ static void i945LayoutTextureImages( i915ContextPtr i915, t->intel.image[face][i].offset = y * pitch + x * t->intel.texelBytes; - t->intel.image[face][i].internalFormat = baseImage->Format; + t->intel.image[face][i].internalFormat = baseImage->_BaseFormat; d >>= 1; @@ -326,7 +326,7 @@ static void i945LayoutTextureImages( i915ContextPtr i915, t->intel.image[0][i].offset = total_height * pitch; - t->intel.image[0][i].internalFormat = baseImage->Format; + t->intel.image[0][i].internalFormat = baseImage->_BaseFormat; @@ -358,7 +358,7 @@ static void i945LayoutTextureImages( i915ContextPtr i915, break; t->intel.image[0][i].offset = offset; - t->intel.image[0][i].internalFormat = baseImage->Format; + t->intel.image[0][i].internalFormat = baseImage->_BaseFormat; if (t->intel.image[0][i].image->IsCompressed) sz = MAX2(1, t->intel.image[0][i].image->Height/4) * pitch; diff --git a/src/mesa/drivers/dri/i915/intel_tex.c b/src/mesa/drivers/dri/i915/intel_tex.c index 396e126011..d256dbf7cb 100644 --- a/src/mesa/drivers/dri/i915/intel_tex.c +++ b/src/mesa/drivers/dri/i915/intel_tex.c @@ -646,8 +646,7 @@ static void intelUploadTexImage( intelContextPtr intel, image->Width, image->Height, image->Depth, offset, row_len, t->Pitch, t->depth_pitch); - switch(image->IntFormat) - { + switch (image->InternalFormat) { case GL_COMPRESSED_RGB_FXT1_3DFX: case GL_COMPRESSED_RGBA_FXT1_3DFX: case GL_RGB_S3TC: @@ -669,9 +668,9 @@ static void intelUploadTexImage( intelContextPtr intel, } break; default: - fprintf(stderr,"Internal Compressed format not supported %d\n", image->IntFormat); + fprintf(stderr,"Internal Compressed format not supported %d\n", image->InternalFormat); break; - } + } } else { GLuint row_len = image->Width * image->TexFormat->TexelBytes; diff --git a/src/mesa/drivers/dri/mach64/mach64_texstate.c b/src/mesa/drivers/dri/mach64/mach64_texstate.c index ada4b056f5..b6a9e3f931 100644 --- a/src/mesa/drivers/dri/mach64/mach64_texstate.c +++ b/src/mesa/drivers/dri/mach64/mach64_texstate.c @@ -163,9 +163,9 @@ static void mach64SetTexImages( mach64ContextPtr mmesa, t->setup.tex_cntl &= ~R128_MIP_MAP_DISABLE; #else - if ( ( baseImage->Format == GL_RGBA ) || - ( baseImage->Format == GL_ALPHA ) || - ( baseImage->Format == GL_LUMINANCE_ALPHA ) ) { + if ( ( baseImage->_BaseFormat == GL_RGBA ) || + ( baseImage->_BaseFormat == GL_ALPHA ) || + ( baseImage->_BaseFormat == GL_LUMINANCE_ALPHA ) ) { t->hasAlpha = 1; } else { t->hasAlpha = 0; @@ -188,7 +188,7 @@ static void mach64UpdateTextureEnv( GLcontext *ctx, int unit ) GLint source = mmesa->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[0][tObj->BaseLevel]->Format; + const GLenum format = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; GLuint s = mmesa->setup.scale_3d_cntl; if ( MACH64_DEBUG & DEBUG_VERBOSE_API ) { diff --git a/src/mesa/drivers/dri/mga/mga_texstate.c b/src/mesa/drivers/dri/mga/mga_texstate.c index 8c28254cbf..71d264b0f1 100644 --- a/src/mesa/drivers/dri/mga/mga_texstate.c +++ b/src/mesa/drivers/dri/mga/mga_texstate.c @@ -205,7 +205,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[0][tObj->BaseLevel]->Format; + GLenum format = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; if (tObj != ctx->Texture.Unit[0].Current2D && tObj != ctx->Texture.Unit[0].CurrentRect) @@ -537,7 +537,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[0][tObj->BaseLevel]->Format; + GLenum format = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; *reg = 0; @@ -634,7 +634,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[0][tObj->BaseLevel]->Format; + GLenum format = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; if (tObj != ctx->Texture.Unit[source].Current2D && tObj != ctx->Texture.Unit[source].CurrentRect) diff --git a/src/mesa/drivers/dri/r128/r128_texstate.c b/src/mesa/drivers/dri/r128/r128_texstate.c index c22323b68f..6b43f21cd4 100644 --- a/src/mesa/drivers/dri/r128/r128_texstate.c +++ b/src/mesa/drivers/dri/r128/r128_texstate.c @@ -201,7 +201,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[0][tObj->BaseLevel]->Format; + const GLenum format = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; GLuint combine; if ( R128_DEBUG & DEBUG_VERBOSE_API ) { diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c index 5c51e30637..9d929516c9 100644 --- a/src/mesa/drivers/dri/r300/r300_texstate.c +++ b/src/mesa/drivers/dri/r300/r300_texstate.c @@ -253,7 +253,7 @@ static void r300SetTexImages(r300ContextPtr rmesa, if(0) fprintf(stderr, "w=%d h=%d d=%d tb=%d intFormat=%d\n", texImage->Width, texImage->Height, texImage->Depth, texImage->TexFormat->TexelBytes, - texImage->IntFormat); + texImage->InternalFormat); /* Align to 32-byte offset. It is faster to do this unconditionally * (no branch penalty). @@ -1325,7 +1325,7 @@ static GLboolean update_tex_common(GLcontext * ctx, int unit) } #endif - format = tObj->Image[0][tObj->BaseLevel]->Format; + format = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; if (rmesa->state.texture.unit[unit].format != format || rmesa->state.texture.unit[unit].envMode != texUnit->EnvMode) { //rmesa->state.texture.unit[unit].format = format; diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c index 9583a6827e..e12fd41ad9 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texstate.c +++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c @@ -1111,7 +1111,7 @@ static GLboolean update_tex_common( GLcontext *ctx, int unit ) rmesa->NewGLState |= _NEW_TEXTURE_MATRIX; } - format = tObj->Image[0][tObj->BaseLevel]->Format; + format = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; if ( rmesa->state.texture.unit[unit].format != format || rmesa->state.texture.unit[unit].envMode != texUnit->EnvMode ) { rmesa->state.texture.unit[unit].format = format; diff --git a/src/mesa/drivers/dri/s3v/s3v_texmem.c b/src/mesa/drivers/dri/s3v/s3v_texmem.c index 0ce3ff5fc2..5b44340d19 100644 --- a/src/mesa/drivers/dri/s3v/s3v_texmem.c +++ b/src/mesa/drivers/dri/s3v/s3v_texmem.c @@ -297,7 +297,7 @@ static void s3vUploadTexLevel( s3vContextPtr vmesa, s3vTextureObjectPtr t, default: fprintf(stderr, "Not supported texture format %s\n", - _mesa_lookup_enum_by_nr(image->Format)); + _mesa_lookup_enum_by_nr(image->_BaseFormat)); } DEBUG_TEX(("words = %i\n\n", words)); diff --git a/src/mesa/drivers/dri/s3v/s3v_texstate.c b/src/mesa/drivers/dri/s3v/s3v_texstate.c index b136c9d378..2719de3663 100644 --- a/src/mesa/drivers/dri/s3v/s3v_texstate.c +++ b/src/mesa/drivers/dri/s3v/s3v_texstate.c @@ -73,7 +73,7 @@ static void s3vSetTexImages( s3vContextPtr vmesa, for ( height = i = 0 ; i < numLevels ; i++ ) { t->image[i].image = tObj->Image[0][firstLevel + i]; t->image[i].offset = height * pitch; - t->image[i].internalFormat = baseImage->Format; + t->image[i].internalFormat = baseImage->_BaseFormat; height += t->image[i].image->Height; t->TextureBaseAddr[i] = (t->BufAddr + t->image[i].offset + _TEXALIGN) & (GLuint)(~_TEXALIGN); @@ -96,7 +96,7 @@ static void s3vUpdateTexEnv( GLcontext *ctx, GLuint unit ) s3vContextPtr vmesa = S3V_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[0][tObj->BaseLevel]->Format; + const GLuint format = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; /* s3vTextureObjectPtr t = (s3vTextureObjectPtr)tObj->DriverData; GLuint tc; @@ -246,9 +246,9 @@ static void s3vUpdateTexUnit( GLcontext *ctx, GLuint unit ) /* Update texture environment if texture object image format or * texture environment state has changed. */ - if (tObj->Image[0][tObj->BaseLevel]->Format != + if (tObj->Image[0][tObj->BaseLevel]->_BaseFormat != vmesa->TexEnvImageFmt[unit]) { - vmesa->TexEnvImageFmt[unit] = tObj->Image[0][tObj->BaseLevel]->Format; + vmesa->TexEnvImageFmt[unit] = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; s3vUpdateTexEnv( ctx, unit ); } #if 1 diff --git a/src/mesa/drivers/dri/savage/savagetex.c b/src/mesa/drivers/dri/savage/savagetex.c index ce9d1def8e..b2802904bd 100644 --- a/src/mesa/drivers/dri/savage/savagetex.c +++ b/src/mesa/drivers/dri/savage/savagetex.c @@ -561,6 +561,7 @@ static struct gl_texture_format _savage_texformat_a1114444 = { 0, /* IntensityBits */ 0, /* IndexBits */ 0, /* DepthBits */ + 0, /* StencilBits */ 2, /* TexelBytes */ _savage_texstore_a1114444, /* StoreTexImageFunc */ NULL, NULL, NULL, NULL, NULL, NULL /* FetchTexel* filled in by @@ -578,6 +579,7 @@ static struct gl_texture_format _savage_texformat_a1118888 = { 0, /* IntensityBits */ 0, /* IndexBits */ 0, /* DepthBits */ + 0, /* StencilBits */ 4, /* TexelBytes */ _savage_texstore_a1118888, /* StoreTexImageFunc */ NULL, NULL, NULL, NULL, NULL, NULL /* FetchTexel* filled in by @@ -1202,7 +1204,7 @@ static void savageUpdateTex0State_s4( GLcontext *ctx ) driUpdateTextureLRU( &t->base ); - format = tObj->Image[0][tObj->BaseLevel]->Format; + format = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; switch (ctx->Texture.Unit[0].EnvMode) { case GL_REPLACE: @@ -1455,7 +1457,7 @@ static void savageUpdateTex1State_s4( GLcontext *ctx ) driUpdateTextureLRU( &t->base ); - format = tObj->Image[0][tObj->BaseLevel]->Format; + format = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; switch (ctx->Texture.Unit[1].EnvMode) { case GL_REPLACE: @@ -1629,7 +1631,7 @@ static void savageUpdateTexState_s3d( GLcontext *ctx ) driUpdateTextureLRU( &t->base ); - format = tObj->Image[0][tObj->BaseLevel]->Format; + format = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; /* FIXME: copied from utah-glx, probably needs some tuning */ switch (ctx->Texture.Unit[0].EnvMode) { diff --git a/src/mesa/drivers/dri/sis/sis_tex.c b/src/mesa/drivers/dri/sis/sis_tex.c index 5fa8256f1b..a8b4c0e74d 100644 --- a/src/mesa/drivers/dri/sis/sis_tex.c +++ b/src/mesa/drivers/dri/sis/sis_tex.c @@ -63,7 +63,7 @@ sisAllocTexImage( sisContextPtr smesa, sisTexObjPtr t, int level, int size, texel_size; if (t->format == 0) { - t->format = image->Format; + t->format = image->_BaseFormat; switch (t->format) { case GL_RGBA: @@ -88,7 +88,7 @@ sisAllocTexImage( sisContextPtr smesa, sisTexObjPtr t, int level, sis_fatal_error("Bad texture format.\n"); } } - assert(t->format == image->Format); + assert(t->format == image->_BaseFormat); texel_size = image->TexFormat->TexelBytes; size = image->Width * image->Height * texel_size + TEXTURE_HW_PLUS; diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tex.c b/src/mesa/drivers/dri/tdfx/tdfx_tex.c index cf4de23b36..6d39067de4 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_tex.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_tex.c @@ -98,7 +98,7 @@ _mesa_halve2x2_teximage2d ( GLcontext *ctx, srcRowStride, /* dstRowStride */ 0, /* dstImageStride */ srcWidth, srcHeight, 1, - texImage->Format, _t, srcImage, &ctx->DefaultPacking); + texImage->_BaseFormat, _t, srcImage, &ctx->DefaultPacking); } if (srcHeight == 1) { @@ -139,7 +139,7 @@ _mesa_halve2x2_teximage2d ( GLcontext *ctx, if (bpt) { src = _s; dst = _d; - texImage->TexFormat->StoreImage(ctx, 2, texImage->Format, + texImage->TexFormat->StoreImage(ctx, 2, texImage->_BaseFormat, texImage->TexFormat, dstImage, 0, 0, 0, /* dstX/Y/Zoffset */ dstWidth * bpt, @@ -1185,7 +1185,7 @@ adjust2DRatio (GLcontext *ctx, return GL_FALSE; } - texImage->TexFormat->StoreImage(ctx, 2, texImage->Format, + texImage->TexFormat->StoreImage(ctx, 2, texImage->_BaseFormat, texImage->TexFormat, tempImage, 0, 0, 0, /* dstX/Y/Zoffset */ width * texelBytes, /* dstRowStride */ @@ -1229,7 +1229,7 @@ adjust2DRatio (GLcontext *ctx, width, height, /* src */ newWidth, newHeight, /* dst */ rawImage /*src*/, tempImage /*dst*/ ); - texImage->TexFormat->StoreImage(ctx, 2, texImage->Format, + texImage->TexFormat->StoreImage(ctx, 2, texImage->_BaseFormat, texImage->TexFormat, texImage->Data, xoffset * mml->wScale, yoffset * mml->hScale, 0, /* dstX/Y/Zoffset */ dstRowStride, @@ -1321,7 +1321,7 @@ tdfxTexImage2D(GLcontext *ctx, GLenum target, GLint level, case GL_RGBA4_S3TC: internalFormat = GL_COMPRESSED_RGBA_FXT1_3DFX; } - texImage->IntFormat = internalFormat; + texImage->InternalFormat = internalFormat; } #endif #if FX_TC_NAPALM @@ -1333,7 +1333,7 @@ tdfxTexImage2D(GLcontext *ctx, GLenum target, GLint level, texNapalm = GL_COMPRESSED_RGBA_FXT1_3DFX; } if (texNapalm) { - texImage->IntFormat = internalFormat = texNapalm; + texImage->InternalFormat = internalFormat = texNapalm; texImage->IsCompressed = GL_TRUE; } } @@ -1386,7 +1386,7 @@ tdfxTexImage2D(GLcontext *ctx, GLenum target, GLint level, else { /* no rescaling needed */ /* unpack image, apply transfer ops and store in texImage->Data */ - texImage->TexFormat->StoreImage(ctx, 2, texImage->Format, + texImage->TexFormat->StoreImage(ctx, 2, texImage->_BaseFormat, texImage->TexFormat, texImage->Data, 0, 0, 0, /* dstX/Y/Zoffset */ dstRowStride, @@ -1469,11 +1469,11 @@ tdfxTexSubImage2D(GLcontext *ctx, GLenum target, GLint level, assert(mml); assert(texImage->Data); /* must have an existing texture image! */ - assert(texImage->Format); + assert(texImage->_BaseFormat); texelBytes = texImage->TexFormat->TexelBytes; if (texImage->IsCompressed) { - dstRowStride = _mesa_compressed_row_stride(texImage->IntFormat, mml->width); + dstRowStride = _mesa_compressed_row_stride(texImage->InternalFormat, mml->width); } else { dstRowStride = mml->width * texelBytes; } @@ -1496,7 +1496,7 @@ tdfxTexSubImage2D(GLcontext *ctx, GLenum target, GLint level, } else { /* no rescaling needed */ - texImage->TexFormat->StoreImage(ctx, 2, texImage->Format, + texImage->TexFormat->StoreImage(ctx, 2, texImage->_BaseFormat, texImage->TexFormat, texImage->Data, xoffset, yoffset, 0, dstRowStride, @@ -1736,12 +1736,12 @@ tdfxCompressedTexSubImage2D( GLcontext *ctx, GLenum target, mml = TDFX_TEXIMAGE_DATA(texImage); assert(mml); - srcRowStride = _mesa_compressed_row_stride(texImage->IntFormat, width); + srcRowStride = _mesa_compressed_row_stride(texImage->InternalFormat, width); - destRowStride = _mesa_compressed_row_stride(texImage->IntFormat, + destRowStride = _mesa_compressed_row_stride(texImage->InternalFormat, mml->width); dest = _mesa_compressed_image_address(xoffset, yoffset, 0, - texImage->IntFormat, + texImage->InternalFormat, mml->width, (GLubyte*) texImage->Data); @@ -1757,9 +1757,9 @@ tdfxCompressedTexSubImage2D( GLcontext *ctx, GLenum target, * see fxDDCompressedTexImage2D for caveats */ if (mml->wScale != 1 || mml->hScale != 1) { - srcRowStride = _mesa_compressed_row_stride(texImage->IntFormat, texImage->Width); + srcRowStride = _mesa_compressed_row_stride(texImage->InternalFormat, texImage->Width); - destRowStride = _mesa_compressed_row_stride(texImage->IntFormat, + destRowStride = _mesa_compressed_row_stride(texImage->InternalFormat, mml->width); _mesa_upscale_teximage2d(srcRowStride, texImage->Height / 4, destRowStride, mml->height / 4, @@ -1829,7 +1829,7 @@ tdfxTestProxyTexImage(GLcontext *ctx, GLenum target, tObj->Image[0][level]->Height = height; tObj->Image[0][level]->Border = border; #if 0 - tObj->Image[0][level]->IntFormat = internalFormat; + tObj->Image[0][level]->InternalFormat = internalFormat; #endif if (level == 0) { /* don't use mipmap levels > 0 */ diff --git a/src/mesa/drivers/dri/tdfx/tdfx_texstate.c b/src/mesa/drivers/dri/tdfx/tdfx_texstate.c index 7059b56e3d..f5f385fad7 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_texstate.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_texstate.c @@ -1629,7 +1629,7 @@ static void setupTextureSingleTMU(GLcontext * ctx, GLuint unit) /* Check if we really need to update the texenv state */ envMode = ctx->Texture.Unit[unit].EnvMode; - baseFormat = tObj->Image[0][tObj->BaseLevel]->Format; + baseFormat = tObj->Image[0][tObj->BaseLevel]->_BaseFormat; if (TDFX_IS_NAPALM(fxMesa)) { /* see if we really need to update the unit */ @@ -1952,10 +1952,10 @@ static void setupTextureDoubleTMU(GLcontext * ctx) baseImage0->Format != fxMesa->TexState.TexFormat[1] || (fxMesa->Fallback & TDFX_FALLBACK_TEXTURE_ENV)*/) { hw1 = SetupTexEnvNapalm(ctx, GL_TRUE, &ctx->Texture.Unit[0], - baseImage0->Format, &fxMesa->TexCombineExt[1]); + baseImage0->_BaseFormat, &fxMesa->TexCombineExt[1]); #if 0/*JJJ*/ fxMesa->TexState.EnvMode[1] = envMode0; - fxMesa->TexState.TexFormat[1] = baseImage0->Format; + fxMesa->TexState.TexFormat[1] = baseImage0->_BaseFormat; fxMesa->TexState.Enabled[0] = ctx->Texture.Unit[0]._ReallyEnabled; #endif } @@ -1964,13 +1964,13 @@ static void setupTextureDoubleTMU(GLcontext * ctx) if (1/*fxMesa->TexState.Enabled[1] != ctx->Texture.Unit[1]._ReallyEnabled || envMode1 != fxMesa->TexState.EnvMode[0] || envMode1 == GL_COMBINE_EXT || - baseImage1->Format != fxMesa->TexState.TexFormat[0] || + baseImage1->_BaseFormat != fxMesa->TexState.TexFormat[0] || (fxMesa->Fallback & TDFX_FALLBACK_TEXTURE_ENV)*/) { hw2 = SetupTexEnvNapalm(ctx, GL_FALSE, &ctx->Texture.Unit[1], - baseImage1->Format, &fxMesa->TexCombineExt[0]); + baseImage1->_BaseFormat, &fxMesa->TexCombineExt[0]); #if 0/*JJJ*/ fxMesa->TexState.EnvMode[0] = envMode1; - fxMesa->TexState.TexFormat[0] = baseImage1->Format; + fxMesa->TexState.TexFormat[0] = baseImage1->_BaseFormat; fxMesa->TexState.Enabled[1] = ctx->Texture.Unit[1]._ReallyEnabled; #endif } @@ -1994,21 +1994,21 @@ static void setupTextureDoubleTMU(GLcontext * ctx) envMode0 == GL_COMBINE_EXT || envMode1 != fxMesa->TexState.EnvMode[unit1] || envMode1 == GL_COMBINE_EXT || - baseImage0->Format != fxMesa->TexState.TexFormat[unit0] || - baseImage1->Format != fxMesa->TexState.TexFormat[unit1] || + baseImage0->_BaseFormat != fxMesa->TexState.TexFormat[unit0] || + baseImage1->_BaseFormat != fxMesa->TexState.TexFormat[unit1] || (fxMesa->Fallback & TDFX_FALLBACK_TEXTURE_ENV)*/) { if (!SetupDoubleTexEnvVoodoo3(ctx, unit0, - ctx->Texture.Unit[0].EnvMode, baseImage0->Format, - ctx->Texture.Unit[1].EnvMode, baseImage1->Format)) { + ctx->Texture.Unit[0].EnvMode, baseImage0->_BaseFormat, + ctx->Texture.Unit[1].EnvMode, baseImage1->_BaseFormat)) { FALLBACK(fxMesa, TDFX_FALLBACK_TEXTURE_ENV, GL_TRUE); } #if 0/*JJJ*/ fxMesa->TexState.EnvMode[unit0] = envMode0; - fxMesa->TexState.TexFormat[unit0] = baseImage0->Format; + fxMesa->TexState.TexFormat[unit0] = baseImage0->_BaseFormat; fxMesa->TexState.EnvMode[unit1] = envMode1; - fxMesa->TexState.TexFormat[unit1] = baseImage1->Format; + fxMesa->TexState.TexFormat[unit1] = baseImage1->_BaseFormat; fxMesa->TexState.Enabled[0] = ctx->Texture.Unit[0]._ReallyEnabled; fxMesa->TexState.Enabled[1] = ctx->Texture.Unit[1]._ReallyEnabled; #endif diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c index fb048c05f8..126a26c345 100644 --- a/src/mesa/drivers/dri/unichrome/via_tex.c +++ b/src/mesa/drivers/dri/unichrome/via_tex.c @@ -782,13 +782,14 @@ static void viaTexImage(GLcontext *ctx, GLint dstRowStride, dstImageStride = 0; GLboolean success; if (texImage->IsCompressed) { - dstRowStride = _mesa_compressed_row_stride(texImage->IntFormat,width); + dstRowStride = _mesa_compressed_row_stride(texImage->InternalFormat,width); } else { dstRowStride = postConvWidth * texImage->TexFormat->TexelBytes; } ASSERT(texImage->TexFormat->StoreImage); - success = texImage->TexFormat->StoreImage(ctx, dims, texImage->Format, + success = texImage->TexFormat->StoreImage(ctx, dims, + texImage->_BaseFormat, texImage->TexFormat, texImage->Data, 0, 0, 0, /* dstX/Y/Zoffset */ diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c index f3f12c4cc7..581df8b2b3 100644 --- a/src/mesa/drivers/glide/fxddtex.c +++ b/src/mesa/drivers/glide/fxddtex.c @@ -95,7 +95,8 @@ _mesa_halve2x2_teximage2d ( GLcontext *ctx, srcRowStride, /* dstRowStride */ 0, /* dstImageStride */ srcWidth, srcHeight, 1, - texImage->Format, _t, srcImage, &ctx->DefaultPacking); + texImage->_BaseFormat, _t, + srcImage, &ctx->DefaultPacking); } if (srcHeight == 1) { @@ -136,7 +137,7 @@ _mesa_halve2x2_teximage2d ( GLcontext *ctx, if (bpt) { src = _s; dst = _d; - texImage->TexFormat->StoreImage(ctx, 2, texImage->Format, + texImage->TexFormat->StoreImage(ctx, 2, texImage->_BaseFormat, texImage->TexFormat, dstImage, 0, 0, 0, /* dstX/Y/Zoffset */ dstWidth * bpt, @@ -1238,7 +1239,7 @@ adjust2DRatio (GLcontext *ctx, return GL_FALSE; } - texImage->TexFormat->StoreImage(ctx, 2, texImage->Format, + texImage->TexFormat->StoreImage(ctx, 2, texImage->_BaseFormat, texImage->TexFormat, tempImage, 0, 0, 0, /* dstX/Y/Zoffset */ width * texelBytes, /* dstRowStride */ @@ -1282,7 +1283,7 @@ adjust2DRatio (GLcontext *ctx, width, height, /* src */ newWidth, newHeight, /* dst */ rawImage /*src*/, tempImage /*dst*/ ); - texImage->TexFormat->StoreImage(ctx, 2, texImage->Format, + texImage->TexFormat->StoreImage(ctx, 2, texImage->_BaseFormat, texImage->TexFormat, texImage->Data, xoffset * mml->wScale, yoffset * mml->hScale, 0, /* dstX/Y/Zoffset */ dstRowStride, @@ -1313,7 +1314,7 @@ fxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level, if (TDFX_DEBUG & VERBOSE_TEXTURE) { fprintf(stderr, "fxDDTexImage2D: id=%d int 0x%x format 0x%x type 0x%x %dx%d\n", - texObj->Name, texImage->IntFormat, format, type, + texObj->Name, texImage->InternalFormat, format, type, texImage->Width, texImage->Height); } @@ -1362,7 +1363,7 @@ fxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level, case GL_RGBA4_S3TC: internalFormat = GL_COMPRESSED_RGBA_FXT1_3DFX; } - texImage->IntFormat = internalFormat; + texImage->InternalFormat = internalFormat; } #endif #if FX_TC_NAPALM @@ -1374,7 +1375,7 @@ fxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level, texNapalm = GL_COMPRESSED_RGBA_FXT1_3DFX; } if (texNapalm) { - texImage->IntFormat = internalFormat = texNapalm; + texImage->InternalFormat = internalFormat = texNapalm; texImage->IsCompressed = GL_TRUE; } } @@ -1429,7 +1430,7 @@ fxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level, else { /* no rescaling needed */ /* unpack image, apply transfer ops and store in texImage->Data */ - texImage->TexFormat->StoreImage(ctx, 2, texImage->Format, + texImage->TexFormat->StoreImage(ctx, 2, texImage->_BaseFormat, texImage->TexFormat, texImage->Data, 0, 0, 0, /* dstX/Y/Zoffset */ dstRowStride, @@ -1515,11 +1516,11 @@ fxDDTexSubImage2D(GLcontext * ctx, GLenum target, GLint level, assert(mml); assert(texImage->Data); /* must have an existing texture image! */ - assert(texImage->Format); + assert(texImage->_BaseFormat); texelBytes = texImage->TexFormat->TexelBytes; if (texImage->IsCompressed) { - dstRowStride = _mesa_compressed_row_stride(texImage->IntFormat, mml->width); + dstRowStride = _mesa_compressed_row_stride(texImage->InternalFormat, mml->width); } else { dstRowStride = mml->width * texelBytes; } @@ -1542,7 +1543,7 @@ fxDDTexSubImage2D(GLcontext * ctx, GLenum target, GLint level, } else { /* no rescaling needed */ - texImage->TexFormat->StoreImage(ctx, 2, texImage->Format, + texImage->TexFormat->StoreImage(ctx, 2, texImage->_BaseFormat, texImage->TexFormat, (GLubyte *) texImage->Data, xoffset, yoffset, 0, /* dstX/Y/Zoffset */ dstRowStride, @@ -1739,12 +1740,12 @@ fxDDCompressedTexSubImage2D( GLcontext *ctx, GLenum target, mml = FX_MIPMAP_DATA(texImage); assert(mml); - srcRowStride = _mesa_compressed_row_stride(texImage->IntFormat, width); + srcRowStride = _mesa_compressed_row_stride(texImage->InternalFormat, width); - destRowStride = _mesa_compressed_row_stride(texImage->IntFormat, + destRowStride = _mesa_compressed_row_stride(texImage->InternalFormat, mml->width); dest = _mesa_compressed_image_address(xoffset, yoffset, 0, - texImage->IntFormat, + texImage->InternalFormat, mml->width, (GLubyte*) texImage->Data); @@ -1760,9 +1761,9 @@ fxDDCompressedTexSubImage2D( GLcontext *ctx, GLenum target, * see fxDDCompressedTexImage2D for caveats */ if (mml->wScale != 1 || mml->hScale != 1) { - srcRowStride = _mesa_compressed_row_stride(texImage->IntFormat, texImage->Width); + srcRowStride = _mesa_compressed_row_stride(texImage->InternalFormat, texImage->Width); - destRowStride = _mesa_compressed_row_stride(texImage->IntFormat, + destRowStride = _mesa_compressed_row_stride(texImage->InternalFormat, mml->width); _mesa_upscale_teximage2d(srcRowStride, texImage->Height / 4, destRowStride, mml->height / 4, |