Module: Mesa
Branch: mesa_7_7_branch
Commit: 93e77b0028170fafd176c3a80a99287343c946b4
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=93e77b0028170fafd176c3a80a99287343c946b4

Author: José Fonseca <[email protected]>
Date:   Fri Mar 12 17:59:10 2010 +0000

mesa: List Quake3 extensions first.

Quake3 truncates the extension string, and GL_EXT_compiled_vertex_array
wasn't being detected, making it very slow.

This is a quick fix. The IMHO best way to address this in a more general
fashion is to sort by year.

---

 src/mesa/main/extensions.c |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index fd705ea..07526d0 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -45,6 +45,18 @@ static const struct {
    const char *name;
    int flag_offset;
 } default_extensions[] = {
+   /*
+    * TODO: Sort by year, to ensure that old extensions are listed first, so
+    * that old applications that truncate the extension string get the basic
+    * extensions, roughly corresponding to what existed then.
+    *
+    * The best example is quake3demo, which often misses
+    * GL_EXT_compiled_vertex_array because it gets truncated.
+    */
+   { ON,  "GL_EXT_compiled_vertex_array",      F(EXT_compiled_vertex_array) },
+   { OFF, "GL_EXT_texture_compression_s3tc",   F(EXT_texture_compression_s3tc) 
},
+   { OFF, "GL_EXT_texture_env_add",            F(EXT_texture_env_add) },
+
    { OFF, "GL_ARB_copy_buffer",                F(ARB_copy_buffer) },
    { OFF, "GL_ARB_depth_texture",              F(ARB_depth_texture) },
    { OFF, "GL_ARB_depth_clamp",                F(ARB_depth_clamp) },
@@ -99,7 +111,6 @@ static const struct {
    { OFF, "GL_EXT_blend_subtract",             F(EXT_blend_subtract) },
    { OFF, "GL_EXT_clip_volume_hint",           F(EXT_clip_volume_hint) },
    { OFF, "GL_EXT_cull_vertex",                F(EXT_cull_vertex) },
-   { ON,  "GL_EXT_compiled_vertex_array",      F(EXT_compiled_vertex_array) },
    { OFF, "GL_EXT_convolution",                F(EXT_convolution) },
    { ON,  "GL_EXT_copy_texture",               F(EXT_copy_texture) },
    { OFF, "GL_EXT_depth_bounds_test",          F(EXT_depth_bounds_test) },
@@ -128,10 +139,8 @@ static const struct {
    { ON,  "GL_EXT_subtexture",                 F(EXT_subtexture) },
    { ON,  "GL_EXT_texture",                    F(EXT_texture) },
    { ON,  "GL_EXT_texture3D",                  F(EXT_texture3D) },
-   { OFF, "GL_EXT_texture_compression_s3tc",   F(EXT_texture_compression_s3tc) 
},
    { OFF, "GL_EXT_texture_cube_map",           F(ARB_texture_cube_map) },
    { ON,  "GL_EXT_texture_edge_clamp",         F(SGIS_texture_edge_clamp) },
-   { OFF, "GL_EXT_texture_env_add",            F(EXT_texture_env_add) },
    { OFF, "GL_EXT_texture_env_combine",        F(EXT_texture_env_combine) },
    { OFF, "GL_EXT_texture_env_dot3",           F(EXT_texture_env_dot3) },
    { OFF, "GL_EXT_texture_filter_anisotropic", 
F(EXT_texture_filter_anisotropic) },

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to