[Xorg] Introduce DRI_VERSION?

Thomas Winischhofer thomas at winischhofer.net
Thu Jun 17 09:47:18 PDT 2004


Jens Owen wrote:
> Thomas Winischhofer wrote:
>>
>> Would you DRI guys mind adding a #define for DRI_VERSION_CURRENT in 
>> the same style as XORG_VERSION_CURRENT so that changes like the types 
>> from drmHandle -> drm_handle_t can be handled smoothly with the C 
>> preprocessor for older versions?
>>
>> Point being: I would like to compile my DDX driver with both XFree86 
>> and X.org as I don't have time to maintain two or more versions. Since 
>> the preprocessor can't check for typedefs (AFAIK...) a 
>> DRI_VERSION_CURRENT would come extremely handy.
>>
>> That shouldn't cause too much hassle...
> 
> 
> Thomas,
> 
> Versioning has always been a tricky issue for DRI developers, and 
> consequently keeping version numbering simple and up to date is important.
> 
> I'd encourage you to considering using/enhancing the existing DRI and 
> DRM versioning.  For example, I'm wondering if the runtime version 
> already built into DRM would help.  It could be extended to use compile 
> time #define's in places where we currently hard code constants, for 
> example in drmGetLibVersion it looks like the minor version was just 
> bumped to 2.  The source for the linux version of this example be seen at:
> 
>   xc/programs/Xserver/hw/xfree86/drivers/os-support/linux/drm/xf86drm.c
> 

Jens, thanks for your response.

Just to avoid a misunderstanding: This version definition is not meant 
as an ABI/API/whatever number; I'd just need that for compilation reasons.

If it is complicated for the DRI folks, why not keep such a version 
#definition in the x.org tree which is updated each time a merge from 
the DRI tree happens?

For example, in xf86drm.h just add

#define DRI_DATE 20040616

That would solve my particular problem quite easily. The name of the 
#define is entirely up to you... choose freely. The date format should 
be in a form suitable for comparison.

That isn't too much work, is it?

Thomas

-- 
Thomas Winischhofer
Vienna/Austria
thomas AT winischhofer DOT net	       *** http://www.winischhofer.net
twini AT xfree86 DOT org




More information about the xorg mailing list