diff options
author | Ian Romanick <[email protected]> | 2010-02-04 16:37:59 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-02-11 15:40:29 -0800 |
commit | 7bcfb66000557a0ef32bdc6b31949a92f95a9ff6 (patch) | |
tree | 7a523e078f077258adca108604cf22a8719de9e5 /src/glx | |
parent | 8bffadbc83d19ecd8be8f0107d51463e36477666 (diff) |
glx: Pass screen number as parameter to CreateContext
Passing the screen parameter to CreateContext will simplify a couple
of changes that are coming.
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/glxcmds.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index e3f77a08410..2eee005db64 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -366,12 +366,13 @@ CreateContext(Display * dpy, XVisualInfo * vis, const __GLcontextModes * const fbconfig, GLXContext shareList, Bool allowDirect, GLXContextID contextID, - unsigned code, int renderType) + unsigned code, int renderType, int screen) { GLXContext gc; #ifdef GLX_DIRECT_RENDERING - int screen = (fbconfig == NULL) ? vis->screen : fbconfig->screen; __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen); +#else + (void) screen; #endif if (dpy == NULL) @@ -504,7 +505,7 @@ glXCreateContext(Display * dpy, XVisualInfo * vis, GLXContext shareList, Bool allowDirect) { return CreateContext(dpy, vis, NULL, shareList, allowDirect, None, - X_GLXCreateContext, 0); + X_GLXCreateContext, 0, vis->screen); } _X_HIDDEN void @@ -1753,8 +1754,11 @@ glXImportContextEXT(Display * dpy, GLXContextID contextID) return NULL; } + /* FIXME: Why does this call CreateContext? There is no protocol sent for + * FIXME: this function. + */ ctx = CreateContext(dpy, NULL, NULL, NULL, False, contextID, - X_GLXCreateContext, 0); + X_GLXCreateContext, 0, 0); if (NULL != ctx) { if (Success != __glXQueryContextInfo(dpy, ctx)) { return NULL; @@ -1803,8 +1807,12 @@ PUBLIC GLXContext glXCreateNewContext(Display * dpy, GLXFBConfig config, int renderType, GLXContext shareList, Bool allowDirect) { - return CreateContext(dpy, NULL, (__GLcontextModes *) config, shareList, - allowDirect, None, X_GLXCreateNewContext, renderType); + const __GLcontextModes *const fbconfig = + (const __GLcontextModes *const) config; + + return CreateContext(dpy, NULL, fbconfig, shareList, + allowDirect, None, X_GLXCreateNewContext, renderType, + fbconfig->screen); } @@ -2293,7 +2301,8 @@ glXCreateContextWithConfigSGIX(Display * dpy, && __glXExtensionBitIsEnabled(psc, SGIX_fbconfig_bit)) { gc = CreateContext(dpy, NULL, (__GLcontextModes *) config, shareList, allowDirect, None, - X_GLXvop_CreateContextWithConfigSGIX, renderType); + X_GLXvop_CreateContextWithConfigSGIX, renderType, + fbconfig->screen); } return gc; |