Ian Romanick wrote:
Since I'm not a lawyer, I'm not going to comment on any of the IP legality of this patch. I am in no way offering any form of legal advice. I do have a comment about the correctness of it that may also apply to similar future (i.e., FXT1) patches.

Roland Scheidegger wrote:

Index: texcompress.c
===================================================================
RCS file: /cvsroot/mesa3d/Mesa-newtree/src/mesa/main/texcompress.c,v
retrieving revision 1.9
diff -u -r1.9 texcompress.c
--- texcompress.c 21 Nov 2003 09:56:50 -0000 1.9
+++ texcompress.c 18 Dec 2003 00:54:43 -0000
@@ -59,6 +59,9 @@
}
}
if (ctx->Extensions.EXT_texture_compression_s3tc) {
+ /* quick hack. don't announce s3tc formats, hopefully noone then will try to
+ compress textures despite having the s3tc extension */
+#if !MESA_S3TC
if (formats) {
formats[n++] = GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
/* Skip this one because it has a restriction (all transparent
@@ -72,6 +75,7 @@
else {
n += 3;
}
+#endif
}
if (ctx->Extensions.S3_s3tc) {
if (formats) {


This is wrong, and may break valid applications. The supported compressed formats should be listed no matter what.
Ok, I'll drop that. It was really just a crazy idea, though I've figured out it won't do any good anyways (apps like QuakeIII will always request a specific format if it's listed or not, the only reason QuakeIII still works when compressed textures are enabled is it only checks for the obsolete and somewhat undocumented s3_s3tc extension).

However, if the requested internal format is compressed and the type does not match, the driver is free to ignore the requested internal format. Technically speaking, if ARB_texture_compression is supported, applications don't need to check for other extensions. They only need to query GL_COMPRESSED_TEXTURE_FORMATS_ARB and choose an available format that they like.
So if I understand correctly, it is sufficient to just check if the format and internalFormat in the xxxChooseTextureFormat function match and use an uncompressed type if they don't? That's nice, it would even make QuakeIII (of course only if the S3_S3tc extension is enabled) work with "compressed" textures ;-). Thinking about it, this probably could also be used to have compressed textures support for chips which don't support it in hardware, so you could use the higher quality textures for instance in nwn (though there might be a lot of texture swapping of course, so probably not that useful).

Roland




------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to