xorg-x11-server/xorg-x11-server-1.1.1-glcore-visual-matching.patch

30 lines
771 B
Diff
Raw Normal View History

--- xorg-server-1.1.1/GL/mesa/X/xf86glx.c.glcore-visual 2006-07-05 14:31:36.000000000 -0400
+++ xorg-server-1.1.1/GL/mesa/X/xf86glx.c 2006-12-11 12:14:30.000000000 -0500
@@ -311,17 +311,22 @@
{
__GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen;
const __GLcontextModes *modes;
- unsigned i = 0;
+ XMesaVisual *xmv;
for ( modes = screen->modes ; modes != NULL ; modes = modes->next ) {
if ( modes->visualID == vid ) {
break;
}
-
- i++;
}
- return (modes != NULL) ? mesaScreen->xm_vis[i] : NULL;
+ if (!modes)
+ return NULL;
+
+ for (xmv = mesaScreen->xm_vis; xmv; xmv++)
+ if ((*xmv)->mesa_visual.visualID == vid)
+ return *xmv;
+
+ return NULL;
}
static void init_screen_visuals(__GLXMESAscreen *screen)