diff options
Diffstat (limited to 'xorg-server/glx/glxscreens.c')
-rw-r--r-- | xorg-server/glx/glxscreens.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/xorg-server/glx/glxscreens.c b/xorg-server/glx/glxscreens.c index 7d29d31de..674e2c681 100644 --- a/xorg-server/glx/glxscreens.c +++ b/xorg-server/glx/glxscreens.c @@ -42,6 +42,7 @@ #include "glxserver.h" #include "glxutil.h" #include "glxext.h" +#include "protocol-versions.h" static int glxScreenPrivateKeyIndex; static DevPrivateKey glxScreenPrivateKey = &glxScreenPrivateKeyIndex; @@ -162,7 +163,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 " @@ -378,9 +380,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; @@ -454,7 +464,6 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen) void __glXScreenDestroy(__GLXscreen *screen) { xfree(screen->GLXvendor); - xfree(screen->GLXversion); xfree(screen->GLXextensions); xfree(screen->GLextensions); } |