diff options
Diffstat (limited to 'src/mesa/drivers/dri/common/dri_util.h')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.h | 99 |
1 files changed, 32 insertions, 67 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index 539d28d114..91992a9a24 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -67,6 +67,22 @@ typedef struct __DRIutilversionRec2 __DRIutilversion2; /** + * Driver specific entry point. Implemented by the driver. Called + * from the top level createNewScreen entry point to initialize the + * __DRIscreenPrivate struct. + */ +extern __GLcontextModes *__driDriverInitScreen(__DRIscreenPrivate *psp); + +/** + * Extensions. + */ +extern const __DRIextension driReadDrawableExtension; +extern const __DRIcopySubBufferExtension driCopySubBufferExtension; +extern const __DRIswapControlExtension driSwapControlExtension; +extern const __DRIframeTrackingExtension driFrameTrackingExtension; +extern const __DRImediaStreamCounterExtension driMediaStreamCounterExtension; + +/** * Used by DRI_VALIDATE_DRAWABLE_INFO */ #define DRI_VALIDATE_DRAWABLE_INFO_ONCE(pDrawPriv) \ @@ -109,11 +125,6 @@ do { \ * this structure. */ struct __DriverAPIRec { - /** - * Driver initialization callback - */ - GLboolean (*InitDriver)(__DRIscreenPrivate *driScrnPriv); - /** * Screen destruction callback */ @@ -248,7 +259,6 @@ struct __DRIdrawablePrivateRec { /** * X's drawable ID associated with this private drawable. */ - __DRIid draw; __DRIdrawable *pdraw; /** @@ -318,20 +328,15 @@ struct __DRIdrawablePrivateRec { __DRIscreenPrivate *driScreenPriv; /** - * \name Display and screen information. - * - * Basically just need these for when the locking code needs to call - * \c __driUtilUpdateDrawableInfo. + * Called via glXSwapBuffers(). */ - /*@{*/ - __DRInativeDisplay *display; - int screen; - /*@}*/ + void (*swapBuffers)( __DRIdrawablePrivate *dPriv ); /** - * Called via glXSwapBuffers(). + * Controls swap interval as used by GLX_SGI_swap_control and + * GLX_MESA_swap_control. */ - void (*swapBuffers)( __DRIdrawablePrivate *dPriv ); + unsigned int swap_interval; }; /** @@ -341,11 +346,6 @@ struct __DRIcontextPrivateRec { /** * Kernel context handle used to access the device lock. */ - __DRIid contextID; - - /** - * Kernel context handle used to access the device lock. - */ drm_context_t hHWContext; /** @@ -354,9 +354,9 @@ struct __DRIcontextPrivateRec { void *driverPrivate; /** - * This context's display pointer. + * Pointer back to the \c __DRIcontext that contains this structure. */ - __DRInativeDisplay *display; + __DRIcontext *pctx; /** * Pointer to drawable currently bound to this context for drawing. @@ -379,11 +379,6 @@ struct __DRIcontextPrivateRec { */ struct __DRIscreenPrivateRec { /** - * Display for this screen - */ - __DRInativeDisplay *display; - - /** * Current screen's number */ int myNum; @@ -394,37 +389,19 @@ struct __DRIscreenPrivateRec { struct __DriverAPIRec DriverAPI; /** - * \name DDX version * DDX / 2D driver version information. - * \todo Replace these fields with a \c __DRIversionRec. */ - /*@{*/ - int ddxMajor; - int ddxMinor; - int ddxPatch; - /*@}*/ + __DRIversion ddx_version; /** - * \name DRI version * DRI X extension version information. - * \todo Replace these fields with a \c __DRIversionRec. */ - /*@{*/ - int driMajor; - int driMinor; - int driPatch; - /*@}*/ + __DRIversion dri_version; /** - * \name DRM version * DRM (kernel module) version information. - * \todo Replace these fields with a \c __DRIversionRec. */ - /*@{*/ - int drmMajor; - int drmMinor; - int drmPatch; - /*@}*/ + __DRIversion drm_version; /** * ID used when the client sets the drawable lock. @@ -490,11 +467,6 @@ struct __DRIscreenPrivateRec { __DRIcontextPrivate dummyContextPriv; /** - * Hash table to hold the drawable information for this screen. - */ - void *drawHash; - - /** * Device-dependent private information (not stored in the SAREA). * * This pointer is never touched by the DRI layer. @@ -502,21 +474,14 @@ struct __DRIscreenPrivateRec { void *private; /** - * GLX visuals / FBConfigs for this screen. These are stored as a - * linked list. - * - * \note - * This field is \b only used in conjunction with the old interfaces. If - * the new interfaces are used, this field will be set to \c NULL and will - * not be dereferenced. + * Pointer back to the \c __DRIscreen that contains this structure. */ - __GLcontextModes *modes; + __DRIscreen *psc; /** - * Pointer back to the \c __DRIscreen that contains this structure. + * Extensions provided by this driver. */ - - __DRIscreen *psc; + const __DRIextension **extensions; }; @@ -540,8 +505,8 @@ extern void __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp); -extern __DRIscreenPrivate * __driUtilCreateNewScreen( __DRInativeDisplay *dpy, - int scrn, __DRIscreen *psc, __GLcontextModes * modes, +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, |