aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-29 09:50:56 +0200
committermarha <marha@users.sourceforge.net>2012-06-29 09:50:56 +0200
commitf6d1847eef027266daa0f75ee92ceb09698b2761 (patch)
tree7ce3418e8255a636034d90be862167046c06473d /xorg-server/hw/xwin
parent67551627d34fff4a0fbe719bce33a3bacb55ccef (diff)
downloadvcxsrv-f6d1847eef027266daa0f75ee92ceb09698b2761.tar.gz
vcxsrv-f6d1847eef027266daa0f75ee92ceb09698b2761.tar.bz2
vcxsrv-f6d1847eef027266daa0f75ee92ceb09698b2761.zip
xkeyboard-config xserver pixman mesa git update 29 Jun 2012
Diffstat (limited to 'xorg-server/hw/xwin')
-rw-r--r--xorg-server/hw/xwin/glx/gen_gl_wrappers.py14
-rw-r--r--xorg-server/hw/xwin/glx/indirect.c44
2 files changed, 40 insertions, 18 deletions
diff --git a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py
index e2d960ec6..15f7ef868 100644
--- a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py
+++ b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py
@@ -67,7 +67,7 @@ if dispatchheader :
fh = open(dispatchheader)
dispatchh = fh.readlines()
- dispatch_regex = re.compile(r'#define\sSET_(\S*)\(')
+ dispatch_regex = re.compile(r'^SET_(\S*)\(')
for line in dispatchh :
line = line.strip()
@@ -308,12 +308,20 @@ for w in sorted(wrappers.keys()) :
if dispatchheader :
print 'void glWinSetupDispatchTable(void)'
print '{'
- print ' struct _glapi_table *disp = _glapi_get_dispatch();'
+ print ' static struct _glapi_table *disp = NULL;'
+ print ''
+ print ' if (!disp)'
+ print ' {'
+ print ' disp = calloc(sizeof(void *), _glapi_get_dispatch_table_size());'
+ print ' assert(disp);'
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 '#warning No wrapper for ' + prefix + d + ' !'
+ print ' }'
+ print ''
+ print ' _glapi_set_dispatch(disp);'
print '}'
diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c
index 56f677a8f..3f34146e5 100644
--- a/xorg-server/hw/xwin/glx/indirect.c
+++ b/xorg-server/hw/xwin/glx/indirect.c
@@ -398,7 +398,9 @@ fbConfigsDump(unsigned int n, __GLXconfig * c)
static __GLXscreen *glxWinScreenProbe(ScreenPtr pScreen);
static __GLXcontext *glxWinCreateContext(__GLXscreen * screen,
__GLXconfig * modes,
- __GLXcontext * baseShareContext);
+ __GLXcontext * baseShareContext,
+ unsigned num_attribs,
+ const uint32_t * attribs, int *error);
static __GLXdrawable *glxWinCreateDrawable(ClientPtr client,
__GLXscreen * screen,
DrawablePtr pDraw,
@@ -473,7 +475,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) {
@@ -482,6 +484,8 @@ glxLogExtensions(const char *prefix, const char *extensions)
}
strl = strtok(str, " ");
+ if (strl == NULL)
+ strl = "";
ErrorF("%s%s", prefix, strl);
length = strlen(prefix) + strlen(strl);
@@ -515,6 +519,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
{
glxWinScreen *screen;
const char *gl_extensions;
+ const char *gl_renderer;
const char *wgl_extensions;
HWND hwnd;
HDC hdc;
@@ -538,14 +543,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;
-
/* Dump out some useful information about the native renderer */
// create window class
@@ -595,7 +592,8 @@ glxWinScreenProbe(ScreenPtr pScreen)
ErrorF("GL_VERSION: %s\n", glGetStringWrapperNonstatic(GL_VERSION));
ErrorF("GL_VENDOR: %s\n", glGetStringWrapperNonstatic(GL_VENDOR));
- ErrorF("GL_RENDERER: %s\n", glGetStringWrapperNonstatic(GL_RENDERER));
+ gl_renderer = (const char *) glGetStringWrapperNonstatic(GL_RENDERER);
+ ErrorF("GL_RENDERER: %s\n", gl_renderer);
gl_extensions = (const char *) glGetStringWrapperNonstatic(GL_EXTENSIONS);
glxLogExtensions("GL_EXTENSIONS: ", gl_extensions);
wgl_extensions = wglGetExtensionsStringARBWrapper(hdc);
@@ -603,6 +601,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
@@ -720,9 +725,6 @@ glxWinScreenProbe(ScreenPtr pScreen)
__glXScreenInit(&screen->base, pScreen);
- // dump out fbConfigs now fbConfigIds and visualIDs have been assigned
- fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs);
-
// Override the GL extensions string set by __glXScreenInit()
screen->base.GLextensions = strdup(gl_extensions);
@@ -765,6 +767,17 @@ glxWinScreenProbe(ScreenPtr pScreen)
ReleaseDC(hwnd, hdc);
DestroyWindow(hwnd);
+ // dump out fbConfigs now fbConfigIds and visualIDs have been assigned
+ fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs);
+
+ /* 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;
+
return &screen->base;
}
@@ -1571,7 +1584,8 @@ glxWinContextDestroy(__GLXcontext * base)
static __GLXcontext *
glxWinCreateContext(__GLXscreen * screen,
- __GLXconfig * modes, __GLXcontext * baseShareContext)
+ __GLXconfig * modes, __GLXcontext * baseShareContext,
+ unsigned num_attribs, const uint32_t * attribs, int *error)
{
__GLXWinContext *context;
__GLXWinContext *shareContext = (__GLXWinContext *) baseShareContext;