summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/glide
diff options
context:
space:
mode:
authorDaniel Borca <[email protected]>2004-05-31 06:24:36 +0000
committerDaniel Borca <[email protected]>2004-05-31 06:24:36 +0000
commite35282cc13acc61d1a789ab729ae6a0ea72aa17b (patch)
tree3fce8778d1dd895d5b2e3c22a09a0b0d3fec8472 /src/mesa/drivers/glide
parent54f4f44843a2ea422cf78a04720562ecc1a5abfd (diff)
reworked FXT1
minor fixes to fxMesa
Diffstat (limited to 'src/mesa/drivers/glide')
-rw-r--r--src/mesa/drivers/glide/fxdd.c2
-rw-r--r--src/mesa/drivers/glide/fxddtex.c16
-rw-r--r--src/mesa/drivers/glide/fxtris.c3
3 files changed, 13 insertions, 8 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c
index 77b98793ec3..7d4c1681941 100644
--- a/src/mesa/drivers/glide/fxdd.c
+++ b/src/mesa/drivers/glide/fxdd.c
@@ -628,7 +628,7 @@ fxDDDrawBitmap4 (GLcontext *ctx, GLint px, GLint py,
struct gl_pixelstore_attrib scissoredUnpack;
/* check if there's any raster operations enabled which we can't handle */
- if ((swrast->_RasterMask & (ALPHATEST_BIT |
+ if ((swrast->_RasterMask & (/*ALPHATEST_BIT |*/
/*BLEND_BIT |*/ /* blending ok, through pixpipe */
DEPTH_BIT | /* could be done with RGB:DEPTH */
FOG_BIT | /* could be done with RGB:DEPTH */
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
diff --git a/src/mesa/drivers/glide/fxtris.c b/src/mesa/drivers/glide/fxtris.c
index c9441673a49..44f672cbb39 100644
--- a/src/mesa/drivers/glide/fxtris.c
+++ b/src/mesa/drivers/glide/fxtris.c
@@ -1387,9 +1387,6 @@ void fxDDInitTriFuncs( GLcontext *ctx )
}
-/* [dBorca] Hack alert:
- * does this approach work with multitex?
- */
GLboolean fxMultipass_ColorSum (GLcontext *ctx, GLuint pass)
{
fxMesaContext fxMesa = FX_CONTEXT(ctx);