Enable ARB_texture_compression. The code has been in place for a long time,
authorIan Romanick <idr@us.ibm.com>
Fri, 19 Aug 2005 00:48:25 +0000 (00:48 +0000)
committerIan Romanick <idr@us.ibm.com>
Fri, 19 Aug 2005 00:48:25 +0000 (00:48 +0000)
but, for whatever reason, the extension wasn't enabled.

Add some comments to i810ChooseTextureFormat.  There's some strangeness with
i810 texture formats.

src/mesa/drivers/dri/i810/i810context.c
src/mesa/drivers/dri/i810/i810tex.c

index 8389321..47c41c5 100644 (file)
@@ -63,6 +63,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "utils.h"
 
 #define need_GL_ARB_multisample
+#define need_GL_ARB_texture_compression
 #include "extension_helper.h"
 
 #ifndef I810_DEBUG
@@ -122,6 +123,7 @@ const struct dri_extension card_extensions[] =
 {
     { "GL_ARB_multisample",                GL_ARB_multisample_functions },
     { "GL_ARB_multitexture",               NULL },
+    { "GL_ARB_texture_compression",        GL_ARB_texture_compression_functions },
     { "GL_ARB_texture_env_add",            NULL },
     { "GL_ARB_texture_mirrored_repeat",    NULL },
     { "GL_EXT_stencil_wrap",               NULL },
index 34a299a..0aba8e8 100644 (file)
@@ -434,6 +434,14 @@ static void i810DeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj )
    _mesa_delete_texture_object(ctx, tObj);
 }
 
+/**
+ * Choose a Mesa texture format to match the requested format.
+ * 
+ * \todo
+ * Determine why \c _mesa_texformat_al88 doesn't work right for
+ * \c GL_LUMINANCE_ALPHA textures.  It seems to work fine for \c GL_INTENSITY,
+ * but \c GL_LUMINANCE_ALPHA gets some red bands in progs/demos/texenv.
+ */
 static const struct gl_texture_format *
 i810ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
                         GLenum format, GLenum type )
@@ -504,7 +512,11 @@ i810ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
    case GL_INTENSITY12:
    case GL_INTENSITY16:
    case GL_COMPRESSED_INTENSITY:
+#if 0
+      return &_mesa_texformat_al88;
+#else
       return &_mesa_texformat_argb4444;
+#endif
 
    case GL_YCBCR_MESA:
       if (type == GL_UNSIGNED_SHORT_8_8_MESA ||