diff options
author | Alan Hourihane <[email protected]> | 2005-05-13 11:56:13 +0000 |
---|---|---|
committer | Alan Hourihane <[email protected]> | 2005-05-13 11:56:13 +0000 |
commit | 64034c4fb5c56f63d37faa6f64f3183ca106856a (patch) | |
tree | f39a426cc5c234b4477e6a9f7814bc21333643a6 /src/mesa | |
parent | 846eb333aee2eeece35a6ec2f8ac8b40e99c5fcd (diff) |
Remove MAX_VISUAL limitations of 100. If running dual head this can
be easily consumed. There are no limitations now and the VisualTable
is realloced when necessary.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/x11/fakeglx.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index 971ca0b55b2..3784044bf9b 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -105,8 +105,7 @@ struct fake_glx_context { #define DONT_CARE -1 -#define MAX_VISUALS 100 -static XMesaVisual VisualTable[MAX_VISUALS]; +static XMesaVisual *VisualTable = NULL; static int NumVisuals = 0; @@ -331,11 +330,6 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo, /* Create a new visual and add it to the list. */ - if (NumVisuals >= MAX_VISUALS) { - _mesa_problem(NULL, "GLX Error: maximum number of visuals exceeded"); - return NULL; - } - xmvis = XMesaCreateVisual( dpy, vinfo, rgbFlag, alphaFlag, dbFlag, stereoFlag, ximageFlag, depth_size, stencil_size, @@ -347,6 +341,10 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo, * if we need to search for it in find_glx_visual(). */ xmvis->vishandle = vinfo; + /* Allocate more space for additional visual */ + VisualTable = _mesa_realloc( VisualTable, + sizeof(XMesaVisual) * NumVisuals, + sizeof(XMesaVisual) * NumVisuals + 1); /* add xmvis to the list */ VisualTable[NumVisuals] = xmvis; NumVisuals++; |