_mesa_enable_1_4_extensions(mesaCtx);
_mesa_enable_1_5_extensions(mesaCtx);
_mesa_enable_2_0_extensions(mesaCtx);
+#if SWTC
+ if (c->Mesa_DXTn) {
+ _mesa_enable_extension(c, "GL_EXT_texture_compression_s3tc");
+ _mesa_enable_extension(c, "GL_S3_s3tc");
+ }
+ _mesa_enable_extension(c, "GL_3DFX_texture_compression_FXT1");
+#endif
/* finish up xmesa context initializations */
c->swapbytes = CHECK_BYTE_ORDER(v) ? GL_FALSE : GL_TRUE;
}
+/**
+ * In SW, we don't really compress GL_COMPRESSED_RGB[A] textures!
+ */
+static const struct gl_texture_format *
+choose_tex_format( GLcontext *ctx, GLint internalFormat,
+ GLenum format, GLenum type )
+{
+ switch (internalFormat) {
+ case GL_COMPRESSED_RGB_ARB:
+ return &_mesa_texformat_rgb;
+ case GL_COMPRESSED_RGBA_ARB:
+ return &_mesa_texformat_rgba;
+ default:
+ return _mesa_choose_tex_format(ctx, internalFormat, format, type);
+ }
+}
+
+
/**
* Initialize the device driver function table with the functions
* we implement in this driver.
}
#endif
driver->TestProxyTexImage = test_proxy_teximage;
+#if SWTC
+ driver->ChooseTextureFormat = choose_tex_format;
+#endif
}