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;
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) {
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) {
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:
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:
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) {
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);
}