summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2012-07-04 20:00:21 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2012-07-04 20:00:21 +0100
commitde431b4422e4697afe5c32ab8b23cfa7d6b9b77a (patch)
treefa8f8b806adb453097a28a8532fcfa814d8d0ac5
parent59d15f68d4fd9bb8d673a08ed1cf767f99212ffb (diff)
parentf3e07519152b470faef73f50a1d0cbeb6f481b4f (diff)
Merge branch 'cygwin-patches-for-1.12' into cygwin-release-1.12xserver-cygwin-1.12.2-2
Conflicts: glx/extension_string.c glx/glxdriswrast.c glx/glxscreens.c
-rw-r--r--glx/extension_string.c2
-rw-r--r--glx/glxdriswrast.c37
-rw-r--r--glx/glxscreens.c14
-rw-r--r--hw/xwin/winprocarg.c12
4 files changed, 50 insertions, 15 deletions
diff --git a/glx/extension_string.c b/glx/extension_string.c
index 866f8bf45..26c69fea5 100644
--- a/glx/extension_string.c
+++ b/glx/extension_string.c
@@ -82,7 +82,7 @@ static const struct extension_info known_glx_extensions[] = {
{GLX(SGIX_fbconfig), VER(1, 3), Y,},
{GLX(SGIX_pbuffer), VER(1, 3), Y,},
{GLX(SGIX_visual_select_group), VER(0, 0), Y,},
- {GLX(INTEL_swap_event), VER(1, 4), N,},
+ {GLX(INTEL_swap_event), VER(0, 0), N,},
{NULL}
};
diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
index c69b4d258..9e8381762 100644
--- a/glx/glxdriswrast.c
+++ b/glx/glxdriswrast.c
@@ -75,6 +75,8 @@ struct __GLXDRIscreen {
const __DRIcopySubBufferExtension *copySubBuffer;
const __DRItexBufferExtension *texBuffer;
const __DRIconfig **driConfigs;
+
+ unsigned char glx_enable_bits[__GLX_EXT_BYTES];
};
struct __GLXDRIcontext {
@@ -400,12 +402,27 @@ initializeExtensions(__GLXDRIscreen * screen)
extensions = screen->core->getExtensions(screen->driScreen);
+ /* GLX_MESA_copy_sub_buffer is always enabled. */
+ __glXEnableExtension(screen->glx_enable_bits, "GLX_MESA_copy_sub_buffer");
+
for (i = 0; extensions[i]; i++) {
+#ifdef __DRI_READ_DRAWABLE
+ if (strcmp(extensions[i]->name, __DRI_READ_DRAWABLE) == 0) {
+ __glXEnableExtension(screen->glx_enable_bits,
+ "GLX_SGI_make_current_read");
+
+ LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_make_current_read\n");
+ }
+#endif
+
#ifdef __DRI_COPY_SUB_BUFFER
if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) {
screen->copySubBuffer =
(const __DRIcopySubBufferExtension *) extensions[i];
- /* GLX_MESA_copy_sub_buffer is always enabled. */
+ __glXEnableExtension(screen->glx_enable_bits,
+ "GLX_MESA_copy_sub_buffer");
+
+ LogMessage(X_INFO, "AIGLX: enabled GLX_MESA_copy_sub_buffer\n");
}
#endif
@@ -413,6 +430,8 @@ initializeExtensions(__GLXDRIscreen * screen)
if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) {
screen->texBuffer = (const __DRItexBufferExtension *) extensions[i];
/* GLX_EXT_texture_from_pixmap is always enabled. */
+ LogMessage(X_INFO,
+ "AIGLX: enabled GLX_EXT_texture_from_pixmapo\n");
}
#endif
/* Ignore unknown extensions */
@@ -424,6 +443,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
{
const char *driverName = "swrast";
__GLXDRIscreen *screen;
+ size_t buffer_size;
screen = calloc(1, sizeof *screen);
if (screen == NULL)
@@ -435,6 +455,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
screen->base.swapInterval = NULL;
screen->base.pScreen = pScreen;
+ __glXInitExtensionEnableBits(screen->glx_enable_bits);
+
screen->driver = glxProbeDriver(driverName,
(void **) &screen->core,
__DRI_CORE, __DRI_CORE_VERSION,
@@ -463,6 +485,19 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
__glXScreenInit(&screen->base, pScreen);
+ /* The first call simply determines the length of the extension string.
+ * This allows us to allocate some memory to hold the extension string,
+ * but it requires that we call __glXGetExtensionString a second time.
+ */
+ buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
+ if (buffer_size > 0) {
+ free(screen->base.GLXextensions);
+
+ screen->base.GLXextensions = xnfalloc(buffer_size);
+ (void) __glXGetExtensionString(screen->glx_enable_bits,
+ screen->base.GLXextensions);
+ }
+
screen->base.GLXmajor = 1;
screen->base.GLXminor = 4;
diff --git a/glx/glxscreens.c b/glx/glxscreens.c
index 74b4c421b..12672cbd1 100644
--- a/glx/glxscreens.c
+++ b/glx/glxscreens.c
@@ -163,18 +163,6 @@ static const char GLServerExtensions[] =
static char GLXServerVendorName[] = "SGI";
unsigned glxMajorVersion = SERVER_GLX_MAJOR_VERSION;
unsigned glxMinorVersion = SERVER_GLX_MINOR_VERSION;
-static char GLXServerExtensions[] =
- "GLX_ARB_multisample "
- "GLX_EXT_visual_info "
- "GLX_EXT_visual_rating "
- "GLX_EXT_import_context "
- "GLX_EXT_texture_from_pixmap "
- "GLX_OML_swap_method " "GLX_SGI_make_current_read "
-#ifndef __APPLE__
- "GLX_SGIS_multisample "
-#endif
- "GLX_SGIX_fbconfig "
- "GLX_SGIX_pbuffer " "GLX_MESA_copy_sub_buffer " "GLX_INTEL_swap_event";
static Bool
glxCloseScreen(int index, ScreenPtr pScreen)
@@ -328,7 +316,7 @@ __glXScreenInit(__GLXscreen * pGlxScreen, ScreenPtr pScreen)
pGlxScreen->pScreen = pScreen;
pGlxScreen->GLextensions = strdup(GLServerExtensions);
pGlxScreen->GLXvendor = strdup(GLXServerVendorName);
- pGlxScreen->GLXextensions = strdup(GLXServerExtensions);
+ pGlxScreen->GLXextensions = strdup("");
/* All GLX providers must support all of the functionality required for at
* least GLX 1.2. If the provider supports a higher version, the GLXminor
diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c
index f0765617e..ca4bb7f5d 100644
--- a/hw/xwin/winprocarg.c
+++ b/hw/xwin/winprocarg.c
@@ -31,6 +31,10 @@ from The Open Group.
#include <xwin-config.h>
#endif
+#ifdef HAVE_SYS_UTSNAME_H
+#include <sys/utsname.h>
+#endif
+
#include <../xfree86/common/xorgVersion.h>
#include "win.h"
#include "winconfig.h"
@@ -1265,6 +1269,14 @@ winLogVersionInfo (void)
ErrorF ("Welcome to the XWin X Server\n");
ErrorF ("Vendor: %s\n", XVENDORNAME);
ErrorF ("Release: %d.%d.%d.%d\n", XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP);
+#ifdef HAVE_SYS_UTSNAME_H
+ {
+ struct utsname name;
+ if (uname(&name) >= 0) {
+ ErrorF("OS: %s %s %s %s %s\n", name.sysname, name.nodename, name.release, name.version, name.machine);
+ }
+ }
+#endif
winOS();
if (strlen(BUILDERSTRING)) ErrorF ("%s\n", BUILDERSTRING);
ErrorF("\n");