diff options
author | Daniel Borca <[email protected]> | 2004-06-24 06:48:05 +0000 |
---|---|---|
committer | Daniel Borca <[email protected]> | 2004-06-24 06:48:05 +0000 |
commit | adf6d0d9f7bf4942f72b3563cdf77dfecea5ec7d (patch) | |
tree | a531e5f7e8e6b45a5355892fe459315132d422cb /src/mesa/drivers/glide/fxsetup.c | |
parent | 701987c877b5346f39b2258c45cf2b6c989fd9cc (diff) |
hack for compressed textures with aspectratio greater than 8:1
Diffstat (limited to 'src/mesa/drivers/glide/fxsetup.c')
-rw-r--r-- | src/mesa/drivers/glide/fxsetup.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c index abef71a35e3..9aa9599ae4c 100644 --- a/src/mesa/drivers/glide/fxsetup.c +++ b/src/mesa/drivers/glide/fxsetup.c @@ -153,6 +153,19 @@ fxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj) else FX_smallLodLog2(ti->info) = FX_largeLodLog2(ti->info); + /* this is necessary because of fxDDCompressedTexImage2D */ + if ((ti->info.format == GR_TEXFMT_ARGB_CMP_FXT1) || + (ti->info.format == GR_TEXFMT_ARGB_CMP_DXT1) || + (ti->info.format == GR_TEXFMT_ARGB_CMP_DXT3) || + (ti->info.format == GR_TEXFMT_ARGB_CMP_DXT5)) { + struct gl_texture_image *texImage = tObj->Image[0][minl]; + tfxMipMapLevel *mml = FX_MIPMAP_DATA(texImage); + if (mml->wScale != 1 || mml->hScale != 1) { + ti->sScale /= mml->wScale; + ti->tScale /= mml->hScale; + } + } + ti->baseLevelInternalFormat = tObj->Image[0][minl]->Format; ti->validated = GL_TRUE; |