xorg-x11-server/xorg-x11-server-1.1.1-glcore-visual-matching.patch
Adam Jackson 72b72a257a * Mon Dec 18 2006 Adam Jackson <ajax@redhat.com> 1.1.1-56
- RHEL5 sync:
  - xorg-x11-server-1.1.1-maxpixclock-option.patch: Allow the maximum pixel
    clock of a monitor to be specified in the config file.
  - xorg-x11-server-1.1.1-glcore-visual-matching.patch: Fix a client crash
    when creating software indirect GLX contexts.
  - xorg-x11-server-1.1.1-vt-activate-is-a-terrible-api.patch: During server
    init, abort if either VT activation ioctl fails.  During shutdown, be
    sure to wait for the VT switch to finish before exiting.
2006-12-18 21:18:01 +00:00

30 lines
771 B
Diff

--- 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)