aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/glx/indirect.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-02-28 19:34:41 +0000
committermarha <marha@users.sourceforge.net>2010-02-28 19:34:41 +0000
commitfedd99993946dd8fc22b60e3611e447f3b8092ca (patch)
treef1486f18c003876c504227d5c2fc602371524aba /xorg-server/hw/xwin/glx/indirect.c
parent94399647b31b4d87cc009954dd213475993a9011 (diff)
parent1ad46cbf3a9963f3d6d8c687480a80d359ec15f8 (diff)
downloadvcxsrv-fedd99993946dd8fc22b60e3611e447f3b8092ca.tar.gz
vcxsrv-fedd99993946dd8fc22b60e3611e447f3b8092ca.tar.bz2
vcxsrv-fedd99993946dd8fc22b60e3611e447f3b8092ca.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/hw/xwin/glx/indirect.c')
-rw-r--r--xorg-server/hw/xwin/glx/indirect.c72
1 files changed, 46 insertions, 26 deletions
diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c
index 7e88c9a40..7247992dc 100644
--- a/xorg-server/hw/xwin/glx/indirect.c
+++ b/xorg-server/hw/xwin/glx/indirect.c
@@ -489,32 +489,52 @@ static LRESULT CALLBACK GlxWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
+/*
+ Report the extensions split and formatted to avoid overflowing a line
+ */
static void
-glxLogExtensions (char *extensions)
+glxLogExtensions(const char *prefix, const char *extensions)
{
- int i = 0;
- char *strl;
- char *str = xalloc(strlen(extensions) + 1);
+ int length = 0;
+ char *strl;
+ char *str = xalloc(strlen(extensions) + 1);
- if (str == NULL)
+ if (str == NULL)
{
- winDebug("\nglxLogExtensions: xalloc error\n");
- return;
+ ErrorF("glxLogExtensions: xalloc error\n");
+ return;
}
- str[strlen(extensions)] = '\0';
- strncpy (str, extensions, strlen(extensions));
- strl = strtok(str, " ");
- winDebug("%s", strl);
- while (1)
+ str[strlen(extensions)] = '\0';
+ strncpy (str, extensions, strlen(extensions));
+
+ strl = strtok(str, " ");
+ winDebug("%s%s", prefix, strl);
+ length = strlen(prefix) + strlen(strl);
+
+ while (1)
{
- strl = strtok(NULL, " ");
- if (strl == NULL) break;
- if (++i%5 == 0) ErrorF("\n\t\t");
- winDebug(" %s", strl);
+ strl = strtok(NULL, " ");
+ if (strl == NULL) break;
+
+ if (length + strlen(strl) + 1 > 120)
+ {
+ winDebug("\n%s",prefix);
+ length = strlen(prefix);
+ }
+ else
+ {
+ winDebug(" ");
+ length++;
+ }
+
+ winDebug("%s", strl);
+ length = length + strlen(strl);
}
- winDebug("\n");
- xfree(str);
+
+ winDebug("\n");
+
+ xfree(str);
}
/* This is called by GlxExtensionInit() asking the GLX provider if it can handle the screen... */
@@ -604,16 +624,14 @@ glxWinScreenProbe(ScreenPtr pScreen)
// (but we need to have a current context for them to be resolvable)
wglResolveExtensionProcs();
- winDebug("GL_VERSION: %s\n", glGetStringWrapperNonstatic(GL_VERSION));
- winDebug("GL_VENDOR: %s\n", glGetStringWrapperNonstatic(GL_VENDOR));
- winDebug("GL_RENDERER: %s\n", glGetStringWrapperNonstatic(GL_RENDERER));
+ 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_extensions = (const char *)glGetStringWrapperNonstatic(GL_EXTENSIONS);
- winDebug("GL_EXTENSIONS: ");
- glxLogExtensions(gl_extensions);
+ glxLogExtensions("GL_EXTENSIONS: ", gl_extensions);
wgl_extensions = wglGetExtensionsStringARBWrapper(hdc);
if (!wgl_extensions) wgl_extensions = "";
- winDebug("WGL_EXTENSIONS:");
- glxLogExtensions(wgl_extensions);
+ glxLogExtensions("WGL_EXTENSIONS: ", wgl_extensions);
// Can you see the problem here? The extensions string is DC specific
// Different DCs for windows on a multimonitor system driven by multiple cards
@@ -751,11 +769,13 @@ glxWinScreenProbe(ScreenPtr pScreen)
if (screen->has_WGL_ARB_multisample)
{
screen->base.GLXversion = xstrdup("1.4");
+ screen->base.GLXmajor = 1;
screen->base.GLXminor = 4;
}
else
{
screen->base.GLXversion = xstrdup("1.3");
+ screen->base.GLXmajor = 1;
screen->base.GLXminor = 3;
}
LogMessage(X_INFO, "AIGLX: Set GLX version to %s\n", screen->base.GLXversion);
@@ -956,7 +976,7 @@ glxWinDrawableCopySubBuffer(__GLXdrawable *drawable,
int x, int y, int w, int h)
{
glAddSwapHintRectWINWrapperNonstatic(x, y, w, h);
- glxWinDrawableSwapBuffers(NULL,drawable);
+ glxWinDrawableSwapBuffers(NULL, drawable);
}
static void