From 96bd41b315ce2943df2e59656fb200fedb866412 Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Thu, 3 Nov 2011 13:14:31 +0200 Subject: [PATCH] dri: reorder as driver,screen,context,drawable --- src/mesa/drivers/dri/common/dri_util.h | 172 ++++++++++++------------- 1 file changed, 86 insertions(+), 86 deletions(-) diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index 3a33d275541..f71b7be47e3 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -108,6 +108,92 @@ struct __DriverAPIRec { extern const struct __DriverAPIRec driDriverAPI; +/** + * Per-screen private driver information. + */ +struct __DRIscreenRec { + /** + * Current screen's number + */ + int myNum; + + /** + * File descriptor returned when the kernel device driver is opened. + * + * Used to: + * - authenticate client to kernel + * - map the frame buffer, SAREA, etc. + * - close the kernel device driver + */ + int fd; + + /** + * DRM (kernel module) version information. + */ + __DRIversion drm_version; + + /** + * Device-dependent private information (not stored in the SAREA). + * + * This pointer is never touched by the DRI layer. + */ + void *driverPrivate; + + void *loaderPrivate; + + const __DRIextension **extensions; + + const __DRIswrastLoaderExtension *swrast_loader; + + struct { + /* Flag to indicate that this is a DRI2 screen. Many of the above + * fields will not be valid or initializaed in that case. */ + __DRIdri2LoaderExtension *loader; + __DRIimageLookupExtension *image; + __DRIuseInvalidateExtension *useInvalidate; + } dri2; + + driOptionCache optionInfo; + driOptionCache optionCache; + + unsigned int api_mask; +}; + +/** + * Per-context private driver information. + */ +struct __DRIcontextRec { + /** + * Device driver's private context data. This structure is opaque. + */ + void *driverPrivate; + + /** + * The loaders's private context data. This structure is opaque. + */ + void *loaderPrivate; + + /** + * Pointer to drawable currently bound to this context for drawing. + */ + __DRIdrawable *driDrawablePriv; + + /** + * Pointer to drawable currently bound to this context for reading. + */ + __DRIdrawable *driReadablePriv; + + /** + * Pointer to screen on which this context was created. + */ + __DRIscreen *driScreenPriv; + + struct { + int draw_stamp; + int read_stamp; + } dri2; +}; + /** * Per-drawable private DRI driver information. */ @@ -164,92 +250,6 @@ struct __DRIdrawableRec { } dri2; }; -/** - * Per-context private driver information. - */ -struct __DRIcontextRec { - /** - * Device driver's private context data. This structure is opaque. - */ - void *driverPrivate; - - /** - * The loaders's private context data. This structure is opaque. - */ - void *loaderPrivate; - - /** - * Pointer to drawable currently bound to this context for drawing. - */ - __DRIdrawable *driDrawablePriv; - - /** - * Pointer to drawable currently bound to this context for reading. - */ - __DRIdrawable *driReadablePriv; - - /** - * Pointer to screen on which this context was created. - */ - __DRIscreen *driScreenPriv; - - struct { - int draw_stamp; - int read_stamp; - } dri2; -}; - -/** - * Per-screen private driver information. - */ -struct __DRIscreenRec { - /** - * Current screen's number - */ - int myNum; - - /** - * File descriptor returned when the kernel device driver is opened. - * - * Used to: - * - authenticate client to kernel - * - map the frame buffer, SAREA, etc. - * - close the kernel device driver - */ - int fd; - - /** - * DRM (kernel module) version information. - */ - __DRIversion drm_version; - - /** - * Device-dependent private information (not stored in the SAREA). - * - * This pointer is never touched by the DRI layer. - */ - void *driverPrivate; - - void *loaderPrivate; - - const __DRIextension **extensions; - - const __DRIswrastLoaderExtension *swrast_loader; - - struct { - /* Flag to indicate that this is a DRI2 screen. Many of the above - * fields will not be valid or initializaed in that case. */ - __DRIdri2LoaderExtension *loader; - __DRIimageLookupExtension *image; - __DRIuseInvalidateExtension *useInvalidate; - } dri2; - - driOptionCache optionInfo; - driOptionCache optionCache; - - unsigned int api_mask; -}; - extern void dri2InvalidateDrawable(__DRIdrawable *drawable);