GL/dri/dri.c | 7 ++++--- GL/dri/dri.h | 21 ++++++++++++++++++--- hw/xfree86/drivers/ati/atidri.c | 7 ++++--- hw/xfree86/drivers/ati/r128_dri.c | 7 ++++--- hw/xfree86/drivers/ati/radeon_dri.c | 7 ++++--- hw/xfree86/drivers/glint/glint_dri.c | 7 ++++--- hw/xfree86/drivers/i810/i810_dri.c | 7 ++++--- hw/xfree86/drivers/i810/i830_dri.c | 7 ++++--- hw/xfree86/drivers/mga/mga_dri.c | 7 ++++--- hw/xfree86/drivers/savage/savage_dri.c | 7 ++++--- hw/xfree86/drivers/sis/sis_dri.c | 7 ++++--- hw/xfree86/drivers/sunffb/ffb_dri.c | 7 ++++--- hw/xfree86/drivers/tdfx/tdfx_dri.c | 7 ++++--- hw/xfree86/drivers/via/via_dri.c | 7 ++++--- 14 files changed, 70 insertions(+), 42 deletions(-) Index: programs/Xserver/GL/dri/dri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/GL/dri/dri.c,v retrieving revision 1.8 diff -u -d -r1.8 dri.c --- programs/Xserver/GL/dri/dri.c 20 Apr 2005 12:25:12 -0000 1.8 +++ programs/Xserver/GL/dri/dri.c 13 May 2005 01:35:40 -0000 @@ -1958,14 +1958,15 @@ 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 Index: programs/Xserver/GL/dri/dri.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/GL/dri/dri.h,v retrieving revision 1.3 diff -u -d -r1.3 dri.h --- programs/Xserver/GL/dri/dri.h 16 Jun 2004 09:37:58 -0000 1.3 +++ programs/Xserver/GL/dri/dri.h 13 May 2005 01:35:40 -0000 @@ -94,14 +94,29 @@ } DRIWrappedFuncsRec, *DRIWrappedFuncsPtr; +/* + * Prior to Xorg 6.8.99.x, 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-03. + * + * 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, Index: programs/Xserver/hw/xfree86/drivers/ati/atidri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/atidri.c,v retrieving revision 1.2 diff -u -d -r1.2 atidri.c --- programs/Xserver/hw/xfree86/drivers/ati/atidri.c 19 Dec 2004 06:56:37 -0000 1.2 +++ programs/Xserver/hw/xfree86/drivers/ati/atidri.c 13 May 2005 01:35:41 -0000 @@ -1094,12 +1094,13 @@ /* Check the DRI version */ DRIQueryVersion( &major, &minor, &patch ); - if ( major != 4 || minor < 0 ) { + if ( major != DRIINFO_MAJOR_VERSION || minor < DRIINFO_MINOR_VERSION ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[dri] ATIDRIScreenInit failed because of a version mismatch.\n" - "[dri] libDRI version is %d.%d.%d but version 4.0.x is needed.\n" + "[dri] libdri version is %d.%d.%d but version %d.%d.x is needed.\n" "[dri] Disabling the DRI.\n", - major, minor, patch ); + major, minor, patch + DRIINFO_MAJOR_VERSION, DRIINFO_MINOR_VERSION ); return FALSE; } Index: programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c,v retrieving revision 1.5 diff -u -d -r1.5 r128_dri.c --- programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c 4 Dec 2004 22:34:54 -0000 1.5 +++ programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c 13 May 2005 01:35:41 -0000 @@ -983,12 +983,13 @@ /* Check the DRI version */ DRIQueryVersion(&major, &minor, &patch); - if (major != 4 || minor < 0) { + if (major != DRIINFO_MAJOR_VERSION || minor < DRIINFO_MINOR_VERSION) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] R128DRIScreenInit failed because of a version mismatch.\n" - "[dri] libDRI version is %d.%d.%d but version 4.0.x is needed.\n" + "[dri] libdri version is %d.%d.%d but version %d.%d.x is needed.\n" "[dri] Disabling the DRI.\n", - major, minor, patch); + major, minor, patch, + DRIINFO_MAJOR_VERSION, DRIINFO_MINOR_VERSION); return FALSE; } Index: programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c,v retrieving revision 1.16 diff -u -d -r1.16 radeon_dri.c --- programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c 24 Mar 2005 06:45:51 -0000 1.16 +++ programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c 13 May 2005 01:35:41 -0000 @@ -1211,14 +1211,15 @@ /* Check the DRI version */ DRIQueryVersion(&major, &minor, &patch); - if (major != 4 || minor < 0) { + if (major != DRIINFO_MAJOR_VERSION || minor < DRIINFO_MINOR_VERSION) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] RADEONDRIScreenInit failed because of a version " "mismatch.\n" - "[dri] libDRI version is %d.%d.%d but version 4.0.x is " + "[dri] libdri version is %d.%d.%d but version %d.%d.x is " "needed.\n" "[dri] Disabling DRI.\n", - major, minor, patch); + major, minor, patch, + DRIINFO_MAJOR_VERSION, DRIINFO_MINOR_VERSION); return FALSE; } Index: programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c,v retrieving revision 1.3 diff -u -d -r1.3 glint_dri.c --- programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c 16 Jun 2004 09:43:59 -0000 1.3 +++ programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c 13 May 2005 01:35:43 -0000 @@ -458,12 +458,13 @@ { int major, minor, patch; DRIQueryVersion(&major, &minor, &patch); - if (major != 4 || minor < 0) { + if (major != DRIINFO_MAJOR_VERSION || minor < DRIINFO_MINOR_VERSION) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] GLINTDRIScreenInit failed because of a version mismatch.\n" - "[dri] libDRI version is %d.%d.%d but version 4.0.x is needed.\n" + "[dri] libdri version is %d.%d.%d but version %d.%d.x is needed.\n" "[dri] Disabling DRI.\n", - major, minor, patch); + major, minor, patch, + DRIINFO_MAJOR_VERSION, DRIINFO_MINOR_VERSION); return FALSE; } } Index: programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c,v retrieving revision 1.6 diff -u -d -r1.6 i810_dri.c --- programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c 24 Jan 2005 15:02:17 -0000 1.6 +++ programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c 13 May 2005 01:35:43 -0000 @@ -319,11 +319,12 @@ int major, minor, patch; DRIQueryVersion(&major, &minor, &patch); - if (major != 4 || minor < 0) { + if (major != DRIINFO_MAJOR_VERSION || minor < DRIINFO_MINOR_VERSION) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] I810DRIScreenInit failed because of a version mismatch.\n" - "[dri] libDRI version is %d.%d.%d bug version 4.0.x is needed.\n" - "[dri] Disabling DRI.\n", major, minor, patch); + "[dri] libdri version is %d.%d.%d bug version %d.%d.x is needed.\n" + "[dri] Disabling DRI.\n", major, minor, patch, + DRIINFO_MAJOR_VERSION, DRIINFO_MINOR_VERSION); return FALSE; } } Index: programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c,v retrieving revision 1.7 diff -u -d -r1.7 i830_dri.c --- programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c 1 Feb 2005 19:47:32 -0000 1.7 +++ programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c 13 May 2005 01:35:43 -0000 @@ -438,12 +438,13 @@ int major, minor, patch; DRIQueryVersion(&major, &minor, &patch); - if (major != 4 || minor < 0) { + if (major != DRIINFO_MAJOR_VERSION || minor < DRIINFO_MINOR_VERSION) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] %s failed because of a version mismatch.\n" - "[dri] libDRI version is %d.%d.%d bug version 4.0.x is needed.\n" + "[dri] libdri version is %d.%d.%d bug version %d.%d.x is needed.\n" "[dri] Disabling DRI.\n", - "I830DRIScreenInit", major, minor, patch); + "I830DRIScreenInit", major, minor, patch, + DRIINFO_MAJOR_VERSION, DRIINFO_MINOR_VERSION); return FALSE; } } Index: programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c,v retrieving revision 1.4 diff -u -d -r1.4 mga_dri.c --- programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c 26 Jul 2004 23:14:37 -0000 1.4 +++ programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c 13 May 2005 01:35:43 -0000 @@ -1012,12 +1012,13 @@ { int major, minor, patch; DRIQueryVersion( &major, &minor, &patch ); - if ( major != 4 || minor < 0 ) { + if ( major != DRIINFO_MAJOR_VERSION || minor < DRIINFO_MINOR_VERSION ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[dri] MGADRIScreenInit failed because of a version mismatch.\n" - "[dri] libDRI version = %d.%d.%d but version 4.0.x is needed.\n" + "[dri] libdri version = %d.%d.%d but version %d.%d.x is needed.\n" "[dri] Disabling the DRI.\n", - major, minor, patch ); + major, minor, patch, + DRIINFO_MAJOR_VERSION, DRIINFO_MINOR_VERSION ); return FALSE; } } Index: programs/Xserver/hw/xfree86/drivers/savage/savage_dri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_dri.c,v retrieving revision 1.19 diff -u -d -r1.19 savage_dri.c --- programs/Xserver/hw/xfree86/drivers/savage/savage_dri.c 17 Mar 2005 00:04:19 -0000 1.19 +++ programs/Xserver/hw/xfree86/drivers/savage/savage_dri.c 13 May 2005 01:35:43 -0000 @@ -834,12 +834,13 @@ { int major, minor, patch; DRIQueryVersion( &major, &minor, &patch ); - if ( major != 4 || minor < 0 ) { + if ( major != DRIINFO_MAJOR_VERSION || minor < DRIINFO_MINOR_VERSION ) { xf86DrvMsg( pScreen->myNum, X_ERROR, "[dri] SAVAGEDRIScreenInit failed because of a version mismatch.\n" - "[dri] libDRI version = %d.%d.%d but version 4.0.x is needed.\n" + "[dri] libdri version = %d.%d.%d but version %d.%d.x is needed.\n" "[dri] Disabling the DRI.\n", - major, minor, patch ); + major, minor, patch, + DRIINFO_MAJOR_VERSION, DRIINFO_MINOR_VERSION ); return FALSE; } } Index: programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c,v retrieving revision 1.14 diff -u -d -r1.14 sis_dri.c --- programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c 21 Apr 2005 21:30:56 -0000 1.14 +++ programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c 13 May 2005 01:35:43 -0000 @@ -271,12 +271,13 @@ { int major, minor, patch; DRIQueryVersion(&major, &minor, &patch); - if(major != 4 || minor < 0) { + if(major != DRIINFO_MAJOR_VERSION || minor < DRIINFO_MINOR_VERSION) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] SISDRIScreenInit failed because of a version mismatch.\n" - "\t[dri] libDRI version is %d.%d.%d but version 4.0.x is needed.\n" + "\t[dri] libdri version is %d.%d.%d but version %d.%d.x is needed.\n" "\t[dri] Disabling DRI.\n", - major, minor, patch); + major, minor, patch, + DRIINFO_MAJOR_VERSION, DRIINFO_MINOR_VERSION); return FALSE; } } Index: programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c,v retrieving revision 1.3 diff -u -d -r1.3 ffb_dri.c --- programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c 16 Jun 2004 09:44:00 -0000 1.3 +++ programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c 13 May 2005 01:35:43 -0000 @@ -219,12 +219,13 @@ { int major, minor, patch; DRIQueryVersion(&major, &minor, &patch); - if (major != 4 || minor < 0) { + if (major != DRIINFO_MAJOR_VERSION || minor < DRIINFO_MINOR_VERSION) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] FFBDRIScreenInit failed because of a version mismatch.\n" - "[dri] libDRI version is %d.%d.%d but version, 4.0.x is needed.\n" + "[dri] libdri version is %d.%d.%d but version %d.%d.x is needed.\n" "[dri] Disabling DRI.\n", - major, minor, patch); + major, minor, patch, + DRIINFO_MAJOR_VERSION, DRIINFO_MINOR_VERSION); return FALSE; } } Index: programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c,v retrieving revision 1.3 diff -u -d -r1.3 tdfx_dri.c --- programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c 16 Jun 2004 09:44:00 -0000 1.3 +++ programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c 13 May 2005 01:35:43 -0000 @@ -308,12 +308,13 @@ { int major, minor, patch; DRIQueryVersion(&major, &minor, &patch); - if (major != 4 || minor < 0) { + if (major != DRIINFO_MAJOR_VERSION || minor < DRIINFO_MINOR_VERSION) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] TDFXDRIScreenInit failed because of a version mismatch.\n" - "[dri] libDRI version is %d.%d.%d but version 4.0.x is needed.\n" + "[dri] libdri version is %d.%d.%d but version %d.%d.x is needed.\n" "[dri] Disabling the DRI.\n", - major, minor, patch); + major, minor, patch, + DRIINFO_MAJOR_VERSION, DRIINFO_MINOR_VERSION); return FALSE; } } Index: programs/Xserver/hw/xfree86/drivers/via/via_dri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/via/via_dri.c,v retrieving revision 1.12 diff -u -d -r1.12 via_dri.c --- programs/Xserver/hw/xfree86/drivers/via/via_dri.c 6 Feb 2005 07:12:43 -0000 1.12 +++ programs/Xserver/hw/xfree86/drivers/via/via_dri.c 13 May 2005 01:35:43 -0000 @@ -560,12 +560,13 @@ { int major, minor, patch; DRIQueryVersion(&major, &minor, &patch); - if (major != 4 || minor < 0) { + if (major != DRIINFO_MAJOR_VERSION || minor < DRIINFO_MINOR_VERSION) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] VIADRIScreenInit failed because of a version mismatch.\n" - "[dri] libDRI version is %d.%d.%d but version 4.0.x is needed.\n" + "[dri] libdri version is %d.%d.%d but version %d.%d.x is needed.\n" "[dri] Disabling DRI.\n", - major, minor, patch); + major, minor, patch, + DRIINFO_MAJOR_VERSION, DRIINFO_MINOR_VERSION); return FALSE; } }