diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index c870e9a82..898a7290f 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -1958,14 +1958,15 @@ DRIGetWrappedFuncs(ScreenPtr pScreen) return &(DRI_SCREEN_PRIV(pScreen)->wrap); } +/* note that this returns the library version, not the protocol version */ void DRIQueryVersion(int *majorVersion, int *minorVersion, int *patchVersion) { - *majorVersion = XF86DRI_MAJOR_VERSION; - *minorVersion = XF86DRI_MINOR_VERSION; - *patchVersion = XF86DRI_PATCH_VERSION; + *majorVersion = DRIINFO_MAJOR_VERSION; + *minorVersion = DRIINFO_MINOR_VERSION; + *patchVersion = DRIINFO_PATCH_VERSION; } static void diff --git a/hw/xfree86/dri/dri.h b/hw/xfree86/dri/dri.h index f556d261e..82d3c0d52 100644 --- a/hw/xfree86/dri/dri.h +++ b/hw/xfree86/dri/dri.h @@ -94,14 +94,29 @@ typedef struct { } DRIWrappedFuncsRec, *DRIWrappedFuncsPtr; +/* + * Prior to Xorg 6.8.99.8, the DRIInfoRec structure was implicitly versioned + * by the XF86DRI_*_VERSION defines in xf86dristr.h. These numbers were also + * being used to version the XFree86-DRI protocol. Bugs #3066 and #3163 + * showed that this was inadequate. The DRIInfoRec structure is now versioned + * by the DRIINFO_*_VERSION defines in this file. - ajax, 2005-05-18. + * + * Revision history: + * 4.1.0 and earlier: DRIQueryVersion returns XF86DRI_*_VERSION. + * 4.2.0: DRIQueryVersion begins returning DRIINFO_*_VERSION. + */ +#define DRIINFO_MAJOR_VERSION 4 +#define DRIINFO_MINOR_VERSION 2 +#define DRIINFO_PATCH_VERSION 0 typedef struct { /* driver call back functions * - * New fields should be added at the end for backwards compatability. - * Don't forget to bump the version minor number in - * xc/lib/GL/dri/xf86dristr.h + * New fields should be added at the end for backwards compatibility. + * Bump the DRIINFO patch number to indicate bugfixes. + * Bump the DRIINFO minor number to indicate new fields. + * Bump the DRIINFO major number to indicate binary-incompatible changes. */ Bool (*CreateContext)(ScreenPtr pScreen, VisualPtr visual,