summaryrefslogtreecommitdiff
path: root/src/glx/x11
diff options
context:
space:
mode:
authorRALOVICH, Kristóf <tade60@freemail.hu>2008-11-04 11:31:53 +0100
committerBrian Paul <brian.paul@tungstengraphics.com>2008-11-26 10:02:11 -0700
commit6d1d1576062e569fe1d372f44ba3f646c21ae1c3 (patch)
tree6612d61841ebf60b515175b645f2b10d9224d03e /src/glx/x11
parent9c7aaa7afbda92587f28cc28c4c8315e7861d318 (diff)
glx: no graphics context during initialization
Diffstat (limited to 'src/glx/x11')
-rw-r--r--src/glx/x11/glx_query.c10
-rw-r--r--src/glx/x11/glxclient.h6
-rw-r--r--src/glx/x11/glxcmds.c4
-rw-r--r--src/glx/x11/glxext.c4
-rw-r--r--src/glx/x11/single2.c2
5 files changed, 15 insertions, 11 deletions
diff --git a/src/glx/x11/glx_query.c b/src/glx/x11/glx_query.c
index 01911e2a3a..2789b841b1 100644
--- a/src/glx/x11/glx_query.c
+++ b/src/glx/x11/glx_query.c
@@ -44,6 +44,7 @@
*/
char *
__glXQueryServerString(Display* dpy,
+ int opcode,
CARD32 screen,
CARD32 name)
{
@@ -70,6 +71,7 @@ __glXQueryServerString(Display* dpy,
*/
char *
__glXGetString(Display* dpy,
+ int opcode,
CARD32 contextTag,
CARD32 name)
{
@@ -166,22 +168,22 @@ __glXGetStringFromServer(Display * dpy, int opcode, CARD32 glxCode,
char *
__glXQueryServerString(Display* dpy,
+ int opcode,
CARD32 screen,
CARD32 name)
{
- GLXContext gc = __glXGetCurrentContext();
- return __glXGetStringFromServer(dpy, gc->majorOpcode,
+ return __glXGetStringFromServer(dpy, opcode,
X_GLXQueryServerString,
screen, name);
}
char *
__glXGetString(Display* dpy,
+ int opcode,
CARD32 contextTag,
CARD32 name)
{
- GLXContext gc = __glXGetCurrentContext();
- return __glXGetStringFromServer(dpy, gc->majorOpcode, X_GLsop_GetString,
+ return __glXGetStringFromServer(dpy, opcode, X_GLsop_GetString,
contextTag, name);
}
diff --git a/src/glx/x11/glxclient.h b/src/glx/x11/glxclient.h
index 361ab70841..16f6074ed8 100644
--- a/src/glx/x11/glxclient.h
+++ b/src/glx/x11/glxclient.h
@@ -739,8 +739,10 @@ extern void _XSend(Display*, const void*, long);
extern void __glXInitializeVisualConfigFromTags( __GLcontextModes *config,
int count, const INT32 *bp, Bool tagged_only, Bool fbconfig_style_tags );
-extern char * __glXQueryServerString(Display* dpy, CARD32 screen, CARD32 name);
-extern char * __glXGetString(Display* dpy, CARD32 screen, CARD32 name);
+extern char * __glXQueryServerString(Display* dpy, int opcode,
+ CARD32 screen, CARD32 name);
+extern char * __glXGetString(Display* dpy, int opcode,
+ CARD32 screen, CARD32 name);
extern char *__glXstrdup(const char *str);
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index 18bf12084b..0bb548f776 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -1336,7 +1336,7 @@ PUBLIC const char *glXQueryExtensionsString( Display *dpy, int screen )
if (!psc->effectiveGLXexts) {
if (!psc->serverGLXexts) {
psc->serverGLXexts =
- __glXQueryServerString(dpy, screen, GLX_EXTENSIONS);
+ __glXQueryServerString(dpy, priv->majorOpcode, screen, GLX_EXTENSIONS);
}
__glXCalculateUsableExtensions(psc,
@@ -1391,7 +1391,7 @@ PUBLIC const char *glXQueryServerString( Display *dpy, int screen, int name )
}
if ( *str == NULL ) {
- *str = __glXQueryServerString(dpy, screen, name);
+ *str = __glXQueryServerString(dpy, priv->majorOpcode, screen, name);
}
return *str;
diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
index 85a3fc69f3..be6edf9b19 100644
--- a/src/glx/x11/glxext.c
+++ b/src/glx/x11/glxext.c
@@ -550,7 +550,7 @@ getFBConfigs(Display * dpy, __GLXdisplayPrivate * priv, int screen)
__GLXscreenConfigs *psc;
psc = priv->screenConfigs + screen;
- psc->serverGLXexts = __glXQueryServerString(dpy, screen, GLX_EXTENSIONS);
+ psc->serverGLXexts = __glXQueryServerString(dpy, priv->majorOpcode, screen, GLX_EXTENSIONS);
LockDisplay(dpy);
@@ -608,7 +608,7 @@ AllocAndFetchScreenConfigs(Display * dpy, __GLXdisplayPrivate * priv)
memset(psc, 0, screens * sizeof(__GLXscreenConfigs));
priv->screenConfigs = psc;
- priv->serverGLXversion = __glXQueryServerString(dpy, 0, GLX_VERSION);
+ priv->serverGLXversion = __glXQueryServerString(dpy, priv->majorOpcode, 0, GLX_VERSION);
if (priv->serverGLXversion == NULL) {
FreeScreenConfigs(priv);
return GL_FALSE;
diff --git a/src/glx/x11/single2.c b/src/glx/x11/single2.c
index 4375cb3126..0b2d5113cc 100644
--- a/src/glx/x11/single2.c
+++ b/src/glx/x11/single2.c
@@ -679,7 +679,7 @@ __indirect_glGetString(GLenum name)
*/
(void) __glXFlushRenderBuffer(gc, gc->pc);
- s = (GLubyte *) __glXGetString(dpy, gc->currentContextTag, name);
+ s = (GLubyte *) __glXGetString(dpy, gc->majorOpcode, gc->currentContextTag, name);
if (!s) {
/* Throw data on the floor */
__glXSetError(gc, GL_OUT_OF_MEMORY);