xref: /OK3568_Linux_fs/external/xserver/hw/dmx/glxProxy/global.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
3*4882a593Smuzhiyun  * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Permission is hereby granted, free of charge, to any person obtaining a
6*4882a593Smuzhiyun  * copy of this software and associated documentation files (the "Software"),
7*4882a593Smuzhiyun  * to deal in the Software without restriction, including without limitation
8*4882a593Smuzhiyun  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9*4882a593Smuzhiyun  * and/or sell copies of the Software, and to permit persons to whom the
10*4882a593Smuzhiyun  * Software is furnished to do so, subject to the following conditions:
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  * The above copyright notice including the dates of first publication and
13*4882a593Smuzhiyun  * either this permission notice or a reference to
14*4882a593Smuzhiyun  * http://oss.sgi.com/projects/FreeB/
15*4882a593Smuzhiyun  * shall be included in all copies or substantial portions of the Software.
16*4882a593Smuzhiyun  *
17*4882a593Smuzhiyun  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18*4882a593Smuzhiyun  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19*4882a593Smuzhiyun  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20*4882a593Smuzhiyun  * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21*4882a593Smuzhiyun  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
22*4882a593Smuzhiyun  * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23*4882a593Smuzhiyun  * SOFTWARE.
24*4882a593Smuzhiyun  *
25*4882a593Smuzhiyun  * Except as contained in this notice, the name of Silicon Graphics, Inc.
26*4882a593Smuzhiyun  * shall not be used in advertising or otherwise to promote the sale, use or
27*4882a593Smuzhiyun  * other dealings in this Software without prior written authorization from
28*4882a593Smuzhiyun  * Silicon Graphics, Inc.
29*4882a593Smuzhiyun  */
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun #include "glxserver.h"
32*4882a593Smuzhiyun 
33*4882a593Smuzhiyun /*
34*4882a593Smuzhiyun ** The last context used by the server.  It is the context that is current
35*4882a593Smuzhiyun ** from the server's perspective.
36*4882a593Smuzhiyun */
37*4882a593Smuzhiyun __GLXcontext *__glXLastContext;
38*4882a593Smuzhiyun 
39*4882a593Smuzhiyun /*
40*4882a593Smuzhiyun ** X resources.
41*4882a593Smuzhiyun */
42*4882a593Smuzhiyun RESTYPE __glXContextRes;
43*4882a593Smuzhiyun RESTYPE __glXClientRes;
44*4882a593Smuzhiyun RESTYPE __glXPixmapRes;
45*4882a593Smuzhiyun RESTYPE __glXWindowRes;
46*4882a593Smuzhiyun RESTYPE __glXPbufferRes;
47*4882a593Smuzhiyun 
48*4882a593Smuzhiyun /*
49*4882a593Smuzhiyun ** Error codes with the extension error base already added in.
50*4882a593Smuzhiyun */
51*4882a593Smuzhiyun int __glXerrorBase;
52*4882a593Smuzhiyun int __glXBadContext, __glXBadContextState, __glXBadDrawable, __glXBadPixmap;
53*4882a593Smuzhiyun int __glXBadContextTag, __glXBadCurrentWindow;
54*4882a593Smuzhiyun int __glXBadRenderRequest, __glXBadLargeRequest;
55*4882a593Smuzhiyun int __glXUnsupportedPrivateRequest;
56*4882a593Smuzhiyun int __glXBadFBConfig, __glXBadPbuffer;
57*4882a593Smuzhiyun 
58*4882a593Smuzhiyun /*
59*4882a593Smuzhiyun ** Reply for most singles.
60*4882a593Smuzhiyun */
61*4882a593Smuzhiyun xGLXSingleReply __glXReply;
62*4882a593Smuzhiyun 
63*4882a593Smuzhiyun /*
64*4882a593Smuzhiyun ** A set of state for each client.  The 0th one is unused because client
65*4882a593Smuzhiyun ** indices start at 1, not 0.
66*4882a593Smuzhiyun */
67*4882a593Smuzhiyun __GLXclientState *__glXClients[MAXCLIENTS + 1];
68*4882a593Smuzhiyun 
69*4882a593Smuzhiyun int __glXVersionMajor;
70*4882a593Smuzhiyun int __glXVersionMinor;
71