diff options
-rw-r--r-- | src/mesa/drivers/glide/fxddtex.c | 62 |
1 files changed, 5 insertions, 57 deletions
diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c index 8665db7a93d..4ccf8da7195 100644 --- a/src/mesa/drivers/glide/fxddtex.c +++ b/src/mesa/drivers/glide/fxddtex.c @@ -66,7 +66,7 @@ _mesa_halve2x2_teximage2d ( GLcontext *ctx, GLuint bpt = 0; GLubyte *_s = NULL; GLubyte *_d = NULL; - GLenum _t; + GLenum _t = 0; if (texImage->TexFormat->MesaFormat == MESA_FORMAT_RGB565) { _t = GL_UNSIGNED_SHORT_5_6_5_REV; @@ -322,14 +322,11 @@ fxDDTexParam(GLcontext * ctx, GLenum target, struct gl_texture_object *tObj, ti->LODblend = FXFALSE; break; case GL_NEAREST_MIPMAP_LINEAR: - /* [koolsmoky] - * trilinear is bugged! mipmap blending produce - * incorrect filtered colors for the smallest mipmap levels. - * [dBorca] + /* [dBorca] * currently Napalm can't do single-pass trilinear, * because the way its combiners are set. So we fall back * to GL_NEAREST_MIPMAP_NEAREST. We'll let true trilinear - * enabled for V2, V3. If user shoots foot, not our problem! + * enabled for V2, V3. */ if (!fxMesa->HaveCmbExt) { if (fxMesa->haveTwoTMUs) { @@ -348,14 +345,11 @@ fxDDTexParam(GLcontext * ctx, GLenum target, struct gl_texture_object *tObj, ti->LODblend = FXFALSE; break; case GL_LINEAR_MIPMAP_LINEAR: - /* [koolsmoky] - * trilinear is bugged! mipmap blending produce - * incorrect filtered colors for the smallest mipmap levels. - * [dBorca] + /* [dBorca] * currently Napalm can't do single-pass trilinear, * because the way its combiners are set. So we fall back * to GL_LINEAR_MIPMAP_NEAREST. We'll let true trilinear - * enabled for V2, V3. If user shoots foot, not our problem! + * enabled for V2, V3. */ if (!fxMesa->HaveCmbExt) { if (fxMesa->haveTwoTMUs) { @@ -1030,11 +1024,6 @@ fxDDChooseTextureFormat( GLcontext *ctx, GLint internalFormat, switch (internalFormat) { case GL_COMPRESSED_RGB: -#if FX_TC_NCC - if (fxMesa->HaveTexus2) { - return &_mesa_texformat_argb8888; - } -#endif /* intentional fall through */ case 3: case GL_RGB: @@ -1052,11 +1041,6 @@ fxDDChooseTextureFormat( GLcontext *ctx, GLint internalFormat, case GL_RGBA4: return &_mesa_texformat_argb4444; case GL_COMPRESSED_RGBA: -#if FX_TC_NCC - if (fxMesa->HaveTexus2) { - return &_mesa_texformat_argb8888; - } -#endif /* intentional fall through */ case 4: case GL_RGBA: @@ -1451,38 +1435,6 @@ fxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level, width, height, 1, format, type, pixels, packing); } -#if FX_TC_NCC - if (fxMesa->HaveTexus2) { - GLenum texNCC = 0; - GLuint texSize = mml->width * mml->height; - if (internalFormat == GL_COMPRESSED_RGB) { - texNCC = GR_TEXFMT_YIQ_422; - } else if (internalFormat == GL_COMPRESSED_RGBA) { - texNCC = GR_TEXFMT_AYIQ_8422; - texSize <<= 1; - } - if (texNCC) { - TxMip txMip, pxMip; - GLubyte *tempImage = MESA_PBUFFER_ALLOC(texSize); - if (!tempImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); - return; - } - txMip.width = mml->width; - txMip.height = mml->height; - txMip.depth = 1; - txMip.data[0] = texImage->Data; - pxMip.data[0] = tempImage; - fxMesa->Glide.txMipQuantize(&pxMip, &txMip, texNCC, TX_DITHER_ERR, TX_COMPRESSION_HEURISTIC); - if (level == 0) { - fxMesa->Glide.txPalToNcc((GuNccTable *)(&(ti->palette)), pxMip.pal); - } - MESA_PBUFFER_FREE(texImage->Data); - texImage->Data = tempImage; - mml->glideFormat = texNCC; - } - } -#endif /* GL_SGIS_generate_mipmap */ if (level == texObj->BaseLevel && texObj->GenerateMipmap) { @@ -1546,10 +1498,6 @@ fxDDTexSubImage2D(GLcontext * ctx, GLenum target, GLint level, tfxMipMapLevel *mml; GLint texelBytes, dstRowStride; - /* [dBorca] Hack alert: - * FX_TC_NCC not supported - */ - if (TDFX_DEBUG & VERBOSE_TEXTURE) { fprintf(stderr, "fxDDTexSubImage2D: id=%d\n", texObj->Name); } |