aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2007-05-15 12:31:31 -0400
committerKristian Høgsberg <[email protected]>2007-10-10 18:47:22 -0400
commitf616a263a25eda135800bea7d3a863c569b93e30 (patch)
treef922c411d8d821a675eb32408e11aa1e16f93669 /src/mesa/drivers/dri
parent295dc2d225ccac1951c0fcc2c08119f31d1b575c (diff)
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.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 84a6d819def..c8be7b07064 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -624,6 +624,14 @@ driCreateNewContext(__DRIscreen *screen, const __GLcontextModes *modes,
}
/*@}*/
+static const __DRIextension **
+driGetExtensions(__DRIscreen *screen)
+{
+ __DRIscreenPrivate *psp = screen->private;
+ static const __DRIextension *extensions[1];
+
+ return extensions;
+}
/*****************************************************************/
/** \name Screen handling functions */
@@ -750,6 +758,7 @@ void * __DRI_CREATE_NEW_SCREEN( int scrn, __DRIscreen *psc,
psp->dummyContextPriv.driScreenPriv = NULL;
psc->destroyScreen = driDestroyScreen;
+ psc->getExtensions = driGetExtensions;
psc->createNewDrawable = driCreateNewDrawable;
psc->getMSC = driGetMSC;
psc->createNewContext = driCreateNewContext;