diff options
author | marha <marha@users.sourceforge.net> | 2012-06-29 16:09:45 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-06-29 16:09:45 +0200 |
commit | 8e69b2fa996acf8fa1d218b67a203eb67e280899 (patch) | |
tree | 1caebab7024f5b62dc57e49a69a20ef10cb8210f /xorg-server/hw/xwin/glx | |
parent | cd103d3f4d59ac4f09cfcf126e572ddb0b9d4628 (diff) | |
parent | f6d1847eef027266daa0f75ee92ceb09698b2761 (diff) | |
download | vcxsrv-8e69b2fa996acf8fa1d218b67a203eb67e280899.tar.gz vcxsrv-8e69b2fa996acf8fa1d218b67a203eb67e280899.tar.bz2 vcxsrv-8e69b2fa996acf8fa1d218b67a203eb67e280899.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/hw/xwin/glx/gen_gl_wrappers.py
xorg-server/hw/xwin/glx/indirect.c
Diffstat (limited to 'xorg-server/hw/xwin/glx')
-rw-r--r-- | xorg-server/hw/xwin/glx/gen_gl_wrappers.py | 4 | ||||
-rw-r--r-- | xorg-server/hw/xwin/glx/indirect.c | 68 |
2 files changed, 38 insertions, 34 deletions
diff --git a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py index d4beee230..d45e7aea9 100644 --- a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py +++ b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py @@ -224,6 +224,8 @@ for w in sorted(wrappers.keys()) : if l[2] == 'in' : if l[3] == 'array' : arg = 'const ' + typemap[l[1]] + ' *' + l[0] + elif l[3] == 'reference' : + arg = 'const ' + typemap[l[1]] + ' *' + l[0] else : arg = typemap[l[1]] + ' ' + l[0] elif l[2] == 'out' : @@ -318,7 +320,7 @@ if dispatchheader : for d in sorted(dispatch.keys()) : if wrappers.has_key(d) : - print ' SET_'+ d + '(disp, (void *)' + prefix + d + 'Wrapper);' + print ' SET_'+ d + '(disp, (void *)' + prefix + d + 'Wrapper);' else : print '#pragma message("No wrapper for ' + prefix + d + ' !")' diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c index 45a6294b5..9dd9660ce 100644 --- a/xorg-server/hw/xwin/glx/indirect.c +++ b/xorg-server/hw/xwin/glx/indirect.c @@ -438,8 +438,7 @@ static __GLXcontext *glxWinCreateContext(__GLXscreen * screen, __GLXconfig * modes, __GLXcontext * baseShareContext, unsigned num_attribs, - const uint32_t *attribs, - int *error); + const uint32_t * attribs, int *error); static __GLXdrawable *glxWinCreateDrawable(ClientPtr client, __GLXscreen * screen, DrawablePtr pDraw, @@ -527,7 +526,7 @@ static void glxLogExtensions(const char *prefix, const char *extensions) { int length = 0; - char *strl; + const char *strl; char *str = strdup(extensions); if (str == NULL) { @@ -536,15 +535,11 @@ glxLogExtensions(const char *prefix, const char *extensions) } strl = strtok(str, " "); - if (!strl) - { - winDebug("%s", prefix); - } - else - { - winDebug("%s%s", prefix, strl); - length = strlen(prefix) + strlen(strl); - } + if (strl == NULL) + strl = ""; + winDebug("%s%s", prefix, strl); + + length = strlen(prefix) + strlen(strl); while (1) { strl = strtok(NULL, " "); @@ -576,6 +571,7 @@ glxWinScreenProbe(ScreenPtr pScreen) { glxWinScreen *screen; const char *gl_extensions; + const char *gl_renderer; const char *wgl_extensions; HWND hwnd; HDC hdc; @@ -601,18 +597,6 @@ glxWinScreenProbe(ScreenPtr pScreen) if (NULL == screen) return NULL; - /* Wrap RealizeWindow, UnrealizeWindow and CopyWindow on this screen */ - screen->RealizeWindow = pScreen->RealizeWindow; - pScreen->RealizeWindow = glxWinRealizeWindow; - screen->UnrealizeWindow = pScreen->UnrealizeWindow; - pScreen->UnrealizeWindow = glxWinUnrealizeWindow; - screen->CopyWindow = pScreen->CopyWindow; - pScreen->CopyWindow = glxWinCopyWindow; - screen->PositionWindow = pScreen->PositionWindow; - pScreen->PositionWindow = glxWinPositionWindow; - screen->DestroyWindow = pScreen->DestroyWindow; - pScreen->DestroyWindow = glxWinDestroyWindow; - /* Dump out some useful information about the native renderer */ // create window class @@ -665,7 +649,8 @@ glxWinScreenProbe(ScreenPtr pScreen) winDebug("GL_VERSION: %s\n", glGetStringWrapperNonstatic(GL_VERSION)); winDebug("GL_VENDOR: %s\n", glGetStringWrapperNonstatic(GL_VENDOR)); - winDebug("GL_RENDERER: %s\n", glGetStringWrapperNonstatic(GL_RENDERER)); + gl_renderer = (const char *) glGetStringWrapperNonstatic(GL_RENDERER); + winDebug("GL_RENDERER: %s\n", gl_renderer); gl_extensions = (const char *) glGetStringWrapperNonstatic(GL_EXTENSIONS); glxLogExtensions("GL_EXTENSIONS: ", gl_extensions); wgl_extensions = wglGetExtensionsStringARBWrapper(hdc); @@ -673,6 +658,13 @@ glxWinScreenProbe(ScreenPtr pScreen) wgl_extensions = ""; glxLogExtensions("WGL_EXTENSIONS: ", wgl_extensions); + if (strcasecmp(gl_renderer, "GDI Generic") == 0) { + free(screen); + LogMessage(X_ERROR, + "AIGLX: Won't use generic native renderer as it is not accelerated\n"); + return NULL; + } + // Can you see the problem here? The extensions string is DC specific // Different DCs for windows on a multimonitor system driven by multiple cards // might have completely different capabilities. Of course, good luck getting @@ -790,11 +782,6 @@ glxWinScreenProbe(ScreenPtr pScreen) __glXScreenInit(&screen->base, pScreen); -#ifdef _DEBUG - // dump out fbConfigs now fbConfigIds and visualIDs have been assigned - fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs); -#endif - // Override the GL extensions string set by __glXScreenInit() screen->base.GLextensions = strdup(gl_extensions); @@ -837,6 +824,23 @@ glxWinScreenProbe(ScreenPtr pScreen) ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); +#ifdef _DEBUG + // dump out fbConfigs now fbConfigIds and visualIDs have been assigned + fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs); +#endif + + /* Wrap RealizeWindow, UnrealizeWindow and CopyWindow on this screen */ + screen->RealizeWindow = pScreen->RealizeWindow; + pScreen->RealizeWindow = glxWinRealizeWindow; + screen->UnrealizeWindow = pScreen->UnrealizeWindow; + pScreen->UnrealizeWindow = glxWinUnrealizeWindow; + screen->CopyWindow = pScreen->CopyWindow; + pScreen->CopyWindow = glxWinCopyWindow; + screen->PositionWindow = pScreen->PositionWindow; + pScreen->PositionWindow = glxWinPositionWindow; + screen->DestroyWindow = pScreen->DestroyWindow; + pScreen->DestroyWindow = glxWinDestroyWindow; + return &screen->base; } @@ -1772,9 +1776,7 @@ glxWinContextDestroy(__GLXcontext * base) static __GLXcontext * glxWinCreateContext(__GLXscreen * screen, __GLXconfig * modes, __GLXcontext * baseShareContext, - unsigned num_attribs, - const uint32_t *attribs, - int *error) + unsigned num_attribs, const uint32_t * attribs, int *error) { __GLXWinContext *context; __GLXWinContext *shareContext = (__GLXWinContext *) baseShareContext; |