From f616a263a25eda135800bea7d3a863c569b93e30 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Tue, 15 May 2007 12:31:31 -0400 Subject: Implement new screen extension API. This new API lets the loader examine DRI level extensions provided by the driver in a forward compatible manner. Much of the churn in the DRI interface is adding support for new extensions or removing old, unused extensions. This new extension mechanism lets the loader query the extensions provided by the driver and implement the extensions it knows about. Deprecating extensions is done by not exporting that extension in the list, which doesn't require keeping old function pointers around to preserve ABI. --- include/GL/internal/dri_interface.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include/GL') diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index aa2b1cf805..ee73233771 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -56,9 +56,24 @@ typedef struct __DRIdriverRec __DRIdriver; typedef struct __DRIframebufferRec __DRIframebuffer; typedef struct __DRIversionRec __DRIversion; typedef struct __DRIinterfaceMethodsRec __DRIinterfaceMethods; + +typedef struct __DRIextensionRec __DRIextension; /*@}*/ +/** + * Extension struct. Drivers 'inherit' from this struct by embedding + * it as the first element in the extension struct. The + * __DRIscreen::getExtensions entry point will return a list of these + * structs and the loader can use the extensions it knows about by + * casting it to a more specific extension and optionally advertising + * the GLX extension. See below for examples. + */ +struct __DRIextensionRec { + const char *name; +}; + + /** * \name Functions provided by the driver loader. */ @@ -274,6 +289,11 @@ struct __DRIscreenRec { */ void (*destroyScreen)(__DRIscreen *screen); + /** + * Method to get screen extensions. + */ + const __DRIextension **(*getExtensions)(__DRIscreen *screen); + /** * Method to create the private DRI drawable data and initialize the * drawable dependent methods. -- cgit v1.2.3