diff options
author | Daniel Borca <[email protected]> | 2004-05-31 06:24:36 +0000 |
---|---|---|
committer | Daniel Borca <[email protected]> | 2004-05-31 06:24:36 +0000 |
commit | e35282cc13acc61d1a789ab729ae6a0ea72aa17b (patch) | |
tree | 3fce8778d1dd895d5b2e3c22a09a0b0d3fec8472 /src/mesa/drivers/glide/fxddtex.c | |
parent | 54f4f44843a2ea422cf78a04720562ecc1a5abfd (diff) |
reworked FXT1
minor fixes to fxMesa
Diffstat (limited to 'src/mesa/drivers/glide/fxddtex.c')
-rw-r--r-- | src/mesa/drivers/glide/fxddtex.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c index 1fbeb8d252d..2a263798c5f 100644 --- a/src/mesa/drivers/glide/fxddtex.c +++ b/src/mesa/drivers/glide/fxddtex.c @@ -660,6 +660,9 @@ fxIsTexSupported(GLenum target, GLint internalFormat, /**********************************************************************/ /**** NEW TEXTURE IMAGE FUNCTIONS ****/ /**********************************************************************/ +extern void +fxt1_decode_1 (const void *texture, int width, + int i, int j, unsigned char *rgba); /* Texel-fetch functions for software texturing and glGetTexImage(). * We should have been able to use some "standard" fetch functions (which @@ -836,7 +839,8 @@ fetch_rgb_fxt1(const struct gl_texture_image *texImage, i = i * mml->wScale; j = j * mml->hScale; - _mesa_texformat_rgb_fxt1.FetchTexel2D(texImage, i, j, k, rgba); + fxt1_decode_1(texImage->Data, mml->width, i, j, rgba); + rgba[ACOMP] = 255; } @@ -849,7 +853,7 @@ fetch_rgba_fxt1(const struct gl_texture_image *texImage, i = i * mml->wScale; j = j * mml->hScale; - _mesa_texformat_rgba_fxt1.FetchTexel2D(texImage, i, j, k, rgba); + fxt1_decode_1(texImage->Data, mml->width, i, j, rgba); } @@ -1303,15 +1307,19 @@ fxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level, case GL_RGB4_S3TC: internalFormat = GL_COMPRESSED_RGB_FXT1_3DFX; break; + case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: case GL_RGBA_S3TC: case GL_RGBA4_S3TC: - texImage->CompressedSize /= 2; - case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: internalFormat = GL_COMPRESSED_RGBA_FXT1_3DFX; } texImage->IntFormat = internalFormat; + texImage->CompressedSize = _mesa_compressed_texture_size(ctx, + mml->width, + mml->height, + 1, + internalFormat); } #endif #if FX_TC_NAPALM |