GLX: Enable GLX 1.4 on DRI2

Return the minimum GLX version supported by all screens.  Assume that
DRI2 screens have all the required features for GLX 1.4.  Assume that
everyone else can only support GLX 1.2.

Reviewed-by: Kristian Høgsberg <krh@redhat.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
Ian Romanick 2009-09-29 16:43:43 -07:00
commit ad5c0d9efa
6 changed files with 38 additions and 7 deletions

View file

@ -739,8 +739,8 @@ int __glXDisp_QueryVersion(__GLXclientState *cl, GLbyte *pc)
** client if it wants to work with older clients; however, in this
** implementation the server just returns its version number.
*/
reply.majorVersion = SERVER_GLX_MAJOR_VERSION;
reply.minorVersion = SERVER_GLX_MINOR_VERSION;
reply.majorVersion = glxMajorVersion;
reply.minorVersion = glxMinorVersion;
reply.length = 0;
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
@ -2360,6 +2360,7 @@ int __glXDisp_QueryServerString(__GLXclientState *cl, GLbyte *pc)
char *buf;
__GLXscreen *pGlxScreen;
int err;
char ver_str[16];
if (!validGlxScreen(client, req->screen, &pGlxScreen, &err))
return err;
@ -2369,7 +2370,11 @@ int __glXDisp_QueryServerString(__GLXclientState *cl, GLbyte *pc)
ptr = pGlxScreen->GLXvendor;
break;
case GLX_VERSION:
ptr = pGlxScreen->GLXversion;
/* 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;
break;
case GLX_EXTENSIONS:
ptr = pGlxScreen->GLXextensions;