summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11/xm_dd.c
diff options
context:
space:
mode:
authorDaniel Borca <dborca@users.sourceforge.net>2004-10-12 07:32:11 +0000
committerDaniel Borca <dborca@users.sourceforge.net>2004-10-12 07:32:11 +0000
commit3c9faa448ccef15a514a5580fe76838822dd2a9e (patch)
tree7488ffe839c7705349a5218ec0dee641a1a82c81 /src/mesa/drivers/x11/xm_dd.c
parent2bff8bd8de1cdb0398a4c6f4519c5716c90343ab (diff)
SWTC trick (disabled for now)
Diffstat (limited to 'src/mesa/drivers/x11/xm_dd.c')
-rw-r--r--src/mesa/drivers/x11/xm_dd.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index 4a290c84db..db94e40c21 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -1149,6 +1149,24 @@ test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
/**
+ * 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.
*/
@@ -1178,6 +1196,9 @@ void xmesa_init_driver_functions( XMesaVisual xmvisual,
}
#endif
driver->TestProxyTexImage = test_proxy_teximage;
+#if SWTC
+ driver->ChooseTextureFormat = choose_tex_format;
+#endif
}