summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/glide/fxdd.c
diff options
context:
space:
mode:
authorDaniel Borca <dborca@users.sourceforge.net>2004-08-20 08:34:30 +0000
committerDaniel Borca <dborca@users.sourceforge.net>2004-08-20 08:34:30 +0000
commitd4edb532012bffbeac7b3aa038aba11977cdf572 (patch)
tree48090402c5677f5db0ecf5973bf391a8f9b43f9a /src/mesa/drivers/glide/fxdd.c
parent14c532f767e226842e80f4d8e3fb4a26f8356d60 (diff)
hide GL_ARB_texture_compression from non-VSA cards
Diffstat (limited to 'src/mesa/drivers/glide/fxdd.c')
-rw-r--r--src/mesa/drivers/glide/fxdd.c39
1 files changed, 16 insertions, 23 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c
index f7db789f4f1..9aacaecaca2 100644
--- a/src/mesa/drivers/glide/fxdd.c
+++ b/src/mesa/drivers/glide/fxdd.c
@@ -1902,26 +1902,6 @@ fxDDInitExtensions(GLcontext * ctx)
_mesa_enable_extension( ctx, "GL_EXT_stencil_wrap" );
}
- /* [dBorca] Hack alert:
- * True texture compression can be done only on Napalm.
- * We will advertise, however, generic texture compression
- * on all Voodoo cards; the Mesa logic allows us to eventually
- * fallback to uncompressed. This will fix those dumb applications
- * which refuse to run w/o texture compression! We actually _can_
- * do texture compression for pre-Napalm cores, through NCC. But
- * NCC poses many issues:
- * 1) NCC w/o DITHER_ERR has poor quality and NCC w/ DITHER_ERR is
- * damn slow!
- * 2) NCC compression cannot be used with multitexturing, because
- * the decompression tables are not per TMU anymore (bear in mind
- * that earlier Voodoos could handle 2 NCC tables for each TMU --
- * just look for POINTCAST_PALETTE). As a last resort, we could
- * fake NCC multitexturing through multipass rendering, but...
- * ohwell, it's not worth the effort...
- * This stand true for multitexturing palletized textures.
- * 3) since NCC is not an OpenGL standard (as opposed to FXT1/DXTC), we
- * can't use precompressed textures!
- */
if (fxMesa->type >= GR_SSTTYPE_Voodoo4) {
_mesa_enable_extension(ctx, "GL_ARB_texture_compression");
_mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1");
@@ -1929,14 +1909,27 @@ fxDDInitExtensions(GLcontext * ctx)
_mesa_enable_extension(ctx, "GL_S3_s3tc");
_mesa_enable_extension(ctx, "GL_NV_blend_square");
} else {
+#if FX_TC_NCC
+ /* [dBorca] Hack alert:
+ * 1) NCC w/o DITHER_ERR has poor quality and NCC w/ DITHER_ERR is
+ * damn slow!
+ * 2) NCC compression cannot be used with multitexturing, because
+ * the decompression tables are not per TMU anymore (bear in mind
+ * that earlier Voodoos could handle 2 NCC tables for each TMU --
+ * just look for POINTCAST_PALETTE). As a last resort, we could
+ * fake NCC multitexturing through multipass rendering, but...
+ * ohwell, it's not worth the effort...
+ * This stand true for multitexturing palletized textures.
+ * 3) since NCC is not an OpenGL standard (as opposed to FXT1/DXTC), we
+ * can't use precompressed textures!
+ */
if (fxMesa->HaveTexus2) {
_mesa_enable_extension(ctx, "GL_ARB_texture_compression");
}
-#if FX_TC_NCC
- else
-#endif
+#else
/* doesn't like texture compression */
_mesa_enable_extension(ctx, "GL_SGIS_generate_mipmap");
+#endif
}
if (fxMesa->HaveCmbExt) {