summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2016-03-23 15:26:23 -0400
committerAdam Jackson <ajax@redhat.com>2016-03-30 11:13:57 -0400
commit36bcbf76dcc7e88cac093f8fb656c525bfeaf65d (patch)
treec168f5d39ab67504a818ed97ac13591fa8af65e5 /glx
parent2a72789ee8e88f612dff48ebe2ebe9fecda7a95d (diff)
glx: Enable GLX 1.4 unconditionally
Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'glx')
-rw-r--r--glx/glxcmds.c12
-rw-r--r--glx/glxdri2.c12
-rw-r--r--glx/glxdriswrast.c3
-rw-r--r--glx/glxext.c2
-rw-r--r--glx/glxscreens.c12
-rw-r--r--glx/glxscreens.h12
6 files changed, 4 insertions, 49 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 561faebb4..4693e6803 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 71dab2ab4..ad97eb5f0 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 aaf55ca89..65abdffd7 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 e41b881f2..f3d8fdda1 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 6a1701694..61b8a522a 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 a90587732..0fe85e69b 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);
};