summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2007-11-05 15:42:55 -0500
committerKristian Høgsberg <[email protected]>2007-11-05 17:02:29 -0500
commite2c2df5c23fe718d319cf59ba91eea7abc0455b6 (patch)
treed0e993084eedb700083a2fc0e9ad4cbebcd6b6bb /src/glx
parentc9ce3e8fd2a8db93c833bfd9a06d31843145657b (diff)
Filter both visuals and fbconfigs against driver supported configs.
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/x11/glxext.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
index 4fcf6e5df07..3572a70a100 100644
--- a/src/glx/x11/glxext.c
+++ b/src/glx/x11/glxext.c
@@ -635,14 +635,13 @@ __glXInitializeVisualConfigFromTags( __GLcontextModes *config, int count,
#ifdef GLX_DIRECT_RENDERING
-static unsigned
+static void
filter_modes( __GLcontextModes ** server_modes,
const __GLcontextModes * driver_modes )
{
__GLcontextModes * m;
__GLcontextModes ** prev_next;
const __GLcontextModes * check;
- unsigned modes_count = 0;
if ( driver_modes == NULL ) {
fprintf(stderr, "libGL warning: 3D driver returned no fbconfigs.\n");
@@ -684,12 +683,9 @@ filter_modes( __GLcontextModes ** server_modes,
_gl_context_modes_destroy( m );
}
else {
- modes_count++;
prev_next = & m->next;
}
}
-
- return modes_count;
}
#ifdef XDAMAGE_1_1_INTERFACE
@@ -954,7 +950,8 @@ CallCreateNewScreen(Display *dpy, int scrn, __GLXscreenConfigs *psc,
& driver_modes );
filter_modes(&psc->configs, driver_modes);
- _gl_context_modes_destroy( driver_modes );
+ filter_modes(&psc->visuals, driver_modes);
+ _gl_context_modes_destroy(driver_modes);
}
}
}