diff options
author | Adam Jackson <ajax@nwnk.net> | 2005-05-18 17:47:35 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2005-05-18 17:47:35 +0000 |
commit | b87a32fb0eafa6d5f12a6faa634662c71fdc97fa (patch) | |
tree | eb242488b56cd0f7c9b6a0d4f235e27d8eccb6a0 /hw | |
parent | fddcde777f50611099d8888456d93be7e566c84e (diff) |
Bug #3163: Create new DRIINFO_*_VERSION macros to indicate the version
number of the DRIInfoRec, disambiguating it from the XF86DRI protocol
version number. Modify DRIQueryVersion to return the libdri version
number, which all DDXes were requesting implicitly. Fix the DDXes to
check for the DRIINFO version they were compiled against.
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/dri/dri.c | 7 | ||||
-rw-r--r-- | hw/xfree86/dri/dri.h | 21 |
2 files changed, 22 insertions, 6 deletions
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, |