aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxscreens.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glx/glxscreens.c')
-rw-r--r--xorg-server/glx/glxscreens.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/xorg-server/glx/glxscreens.c b/xorg-server/glx/glxscreens.c
index c6f5700d5..2f6d39efa 100644
--- a/xorg-server/glx/glxscreens.c
+++ b/xorg-server/glx/glxscreens.c
@@ -46,6 +46,7 @@
#include "glxserver.h"
#include "glxutil.h"
#include "glxext.h"
+#include "protocol-versions.h"
static int glxScreenPrivateKeyIndex;
static DevPrivateKey glxScreenPrivateKey = &glxScreenPrivateKeyIndex;
@@ -166,7 +167,8 @@ static const char GLServerExtensions[] =
** supported across all screens in a multi-screen system.
*/
static char GLXServerVendorName[] = "SGI";
-static char GLXServerVersion[] = "1.2";
+unsigned glxMajorVersion = SERVER_GLX_MAJOR_VERSION;
+unsigned glxMinorVersion = SERVER_GLX_MINOR_VERSION;
static char GLXServerExtensions[] =
"GLX_ARB_multisample "
"GLX_EXT_visual_info "
@@ -382,9 +384,17 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen)
pGlxScreen->pScreen = pScreen;
pGlxScreen->GLextensions = xstrdup(GLServerExtensions);
pGlxScreen->GLXvendor = xstrdup(GLXServerVendorName);
- pGlxScreen->GLXversion = xstrdup(GLXServerVersion);
pGlxScreen->GLXextensions = xstrdup(GLXServerExtensions);
+ /* 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;
pGlxScreen->DestroyWindow = pScreen->DestroyWindow;
@@ -458,7 +468,6 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen)
void __glXScreenDestroy(__GLXscreen *screen)
{
xfree(screen->GLXvendor);
- xfree(screen->GLXversion);
xfree(screen->GLXextensions);
xfree(screen->GLextensions);
}