[PATCH xserver 09/13] glx: Enable GLX 1.4 unconditionally
Adam Jackson
ajax at redhat.com
Wed Mar 23 22:46:51 UTC 2016
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
glx/glxcmds.c | 12 ++++--------
glx/glxdri2.c | 12 ------------
glx/glxdriswrast.c | 3 ---
glx/glxext.c | 2 --
glx/glxscreens.c | 12 ------------
glx/glxscreens.h | 12 ------------
hw/xquartz/GL/indirect.c | 3 ---
hw/xwin/glx/indirect.c | 20 --------------------
8 files changed, 4 insertions(+), 72 deletions(-)
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 561faeb..4693e68 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -45,6 +45,7 @@
#include "indirect_dispatch.h"
#include "indirect_table.h"
#include "indirect_util.h"
+#include "protocol-versions.h"
static char GLXServerVendorName[] = "SGI";
@@ -797,8 +798,8 @@ __glXDisp_QueryVersion(__GLXclientState * cl, GLbyte * pc)
.type = X_Reply,
.sequenceNumber = client->sequence,
.length = 0,
- .majorVersion = glxMajorVersion,
- .minorVersion = glxMinorVersion
+ .majorVersion = SERVER_GLX_MAJOR_VERSION,
+ .minorVersion = SERVER_GLX_MINOR_VERSION
};
if (client->swapped) {
@@ -2454,7 +2455,6 @@ __glXDisp_QueryServerString(__GLXclientState * cl, GLbyte * pc)
char *buf;
__GLXscreen *pGlxScreen;
int err;
- char ver_str[16];
REQUEST_SIZE_MATCH(xGLXQueryServerStringReq);
@@ -2466,11 +2466,7 @@ __glXDisp_QueryServerString(__GLXclientState * cl, GLbyte * pc)
ptr = GLXServerVendorName;
break;
case GLX_VERSION:
- /* Return to the server version rather than the screen version
- * to prevent confusion when they do not match.
- */
- snprintf(ver_str, 16, "%d.%d", glxMajorVersion, glxMinorVersion);
- ptr = ver_str;
+ ptr = "1.4";
break;
case GLX_EXTENSIONS:
ptr = pGlxScreen->GLXextensions;
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 71dab2a..ad97eb5 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -1000,18 +1000,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
screen->base.GLXextensions);
}
- /* We're going to assume (perhaps incorrectly?) that all DRI2-enabled
- * drivers support the required extensions for GLX 1.4. The extensions
- * we're assuming are:
- *
- * - GLX_SGI_make_current_read (1.3)
- * - GLX_SGIX_fbconfig (1.3)
- * - GLX_SGIX_pbuffer (1.3)
- * - GLX_ARB_multisample (1.4)
- */
- screen->base.GLXmajor = 1;
- screen->base.GLXminor = 4;
-
screen->enterVT = pScrn->EnterVT;
pScrn->EnterVT = glxDRIEnterVT;
screen->leaveVT = pScrn->LeaveVT;
diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
index aaf55ca..65abdff 100644
--- a/glx/glxdriswrast.c
+++ b/glx/glxdriswrast.c
@@ -500,9 +500,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
screen->base.GLXextensions);
}
- screen->base.GLXmajor = 1;
- screen->base.GLXminor = 4;
-
__glXsetGetProcAddress(glXGetProcAddressARB);
LogMessage(X_INFO, "AIGLX: Loaded and initialized %s\n", driverName);
diff --git a/glx/glxext.c b/glx/glxext.c
index e41b881..f3d8fdd 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -380,8 +380,6 @@ GlxExtensionInit(void)
glxScreen = p->screenProbe(pScreen);
if (glxScreen != NULL) {
- if (glxScreen->GLXminor < glxMinorVersion)
- glxMinorVersion = glxScreen->GLXminor;
LogMessage(X_INFO,
"GLX: Initialized %s GL provider for screen %d\n",
p->name, i);
diff --git a/glx/glxscreens.c b/glx/glxscreens.c
index 6a17016..61b8a52 100644
--- a/glx/glxscreens.c
+++ b/glx/glxscreens.c
@@ -154,9 +154,6 @@ static const char GLServerExtensions[] =
"GL_SGIX_shadow_ambient "
"GL_SUN_slice_accum ";
-unsigned glxMajorVersion = SERVER_GLX_MAJOR_VERSION;
-unsigned glxMinorVersion = SERVER_GLX_MINOR_VERSION;
-
static Bool
glxCloseScreen(ScreenPtr pScreen)
{
@@ -313,15 +310,6 @@ __glXScreenInit(__GLXscreen * pGlxScreen, ScreenPtr pScreen)
pGlxScreen->GLextensions = strdup(GLServerExtensions);
pGlxScreen->GLXextensions = NULL;
- /* 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
- * version can be changed in the provider's screen-probe routine. For
- * most providers, the screen-probe routine is the caller of this
- * function.
- */
- pGlxScreen->GLXmajor = 1;
- pGlxScreen->GLXminor = 2;
-
pGlxScreen->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = glxCloseScreen;
diff --git a/glx/glxscreens.h b/glx/glxscreens.h
index a905877..0fe85e6 100644
--- a/glx/glxscreens.h
+++ b/glx/glxscreens.h
@@ -140,20 +140,8 @@ struct __GLXscreen {
GLint numVisuals;
char *GLextensions;
-
char *GLXextensions;
- /**
- * \name GLX version supported by this screen.
- *
- * Since the GLX version advertised by the server is for the whole server,
- * the GLX protocol code uses the minimum version supported on all screens.
- */
- /*@{ */
- unsigned GLXmajor;
- unsigned GLXminor;
- /*@} */
-
Bool (*CloseScreen) (ScreenPtr pScreen);
};
diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index 398cdf1..8233608 100644
--- a/hw/xquartz/GL/indirect.c
+++ b/hw/xquartz/GL/indirect.c
@@ -548,9 +548,6 @@ __glXAquaScreenProbe(ScreenPtr pScreen)
__glXInitExtensionEnableBits(screen->glx_enable_bits);
__glXScreenInit(&screen->base, pScreen);
- screen->base.GLXmajor = 1;
- screen->base.GLXminor = 4;
-
//__glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_create_context");
//__glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_create_context_profile");
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index 4a0c283..76ed51b 100644
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -714,27 +714,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
screen->base.GLXextensions);
}
}
-
- //
- // Override the GLX version (__glXScreenInit() sets it to "1.2")
- // if we have all the needed extensions to operate as a higher version
- //
- // SGIX_fbconfig && SGIX_pbuffer && SGI_make_current_read -> 1.3
- // ARB_multisample -> 1.4
- //
- if (screen->has_WGL_ARB_pbuffer) {
- if (screen->has_WGL_ARB_multisample) {
- screen->base.GLXmajor = 1;
- screen->base.GLXminor = 4;
- }
- else {
- screen->base.GLXmajor = 1;
- screen->base.GLXminor = 3;
- }
- }
}
- LogMessage(X_INFO, "AIGLX: Set GLX version to %d.%d\n",
- screen->base.GLXmajor, screen->base.GLXminor);
wglMakeCurrent(NULL, NULL);
wglDeleteContext(hglrc);
--
2.5.0
More information about the xorg-devel
mailing list