From 6cb3f5c4d8618a14bb7ad1d9df10ed7e648a7b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 28 Feb 2008 10:32:28 -0500 Subject: Use __DRIextension mechanism providing loader functionality to the driver. Instead of passing in a fixed struct, the loader now passes in a list of __DRIextension structs, to advertise the functionality it can provide to the driver. Each extension is individually versioned and can be extended or phased out as the interface develops. --- src/mesa/drivers/dri/common/dri_util.h | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) (limited to 'src/mesa/drivers/dri/common/dri_util.h') diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index cb9e8909b7..e6659811d7 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -517,6 +517,12 @@ struct __DRIscreenPrivateRec { */ const __DRIextension **extensions; + /* Extensions provided by the loader. */ + const __DRIcontextModesExtension *contextModes; + const __DRIgetDrawableInfoExtension *getDrawableInfo; + const __DRIsystemTimeExtension *systemTime; + const __DRIdamageExtension *damage; + struct { /* Flag to indicate that this is a DRI2 screen. Many of the above * fields will not be valid or initializaed in that case. */ @@ -525,6 +531,7 @@ struct __DRIscreenPrivateRec { void *sarea; __DRIEventBuffer *buffer; __DRILock *lock; + __DRIcoreDRI2Extension *core; } dri2; /* The lock actually in use, old sarea or DRI2 */ @@ -554,27 +561,8 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp); extern int __driParseEvents(__DRIscreenPrivate *psp, __DRIdrawablePrivate *pdp); -extern __DRIscreenPrivate * __driUtilCreateNewScreen( int scr, __DRIscreen *psc, - __GLcontextModes * modes, - const __DRIversion * ddx_version, const __DRIversion * dri_version, - const __DRIversion * drm_version, const __DRIframebuffer * frame_buffer, - drm_sarea_t *pSAREA, int fd, int internal_api_version, - const struct __DriverAPIRec *driverAPI ); - -/* Test the version of the internal GLX API. Returns a value like strcmp. */ -extern int -driCompareGLXAPIVersion( GLint required_version ); - extern float driCalculateSwapUsage( __DRIdrawablePrivate *dPriv, int64_t last_swap_ust, int64_t current_ust ); -/** - * Pointer to the \c __DRIinterfaceMethods passed to the driver by the loader. - * - * This pointer is set in the driver's \c __driCreateNewScreen function and - * is defined in dri_util.c. - */ -extern const __DRIinterfaceMethods * dri_interface; - #endif /* _DRI_UTIL_H_ */ -- cgit v1.2.3