diff options
author | Kristian Høgsberg <krh@redhat.com> | 2008-02-28 10:32:28 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2008-02-29 15:05:39 -0500 |
commit | 6cb3f5c4d8618a14bb7ad1d9df10ed7e648a7b2b (patch) | |
tree | b4fa3dcaf590e54c455aeaa8c68d2dc7897b234d /src/mesa/drivers/dri/common/dri_util.h | |
parent | 16242a8007f41ab63f9a28bb9a750857c8cdb8af (diff) |
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.
Diffstat (limited to 'src/mesa/drivers/dri/common/dri_util.h')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.h | 26 |
1 files changed, 7 insertions, 19 deletions
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_ */ |