From 2edc87eb3d7283274c3d0714e90078736f8d985e Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 5 Nov 2007 09:24:03 -0700 Subject: clean-up/re-org of intel_framebuffer code --- src/mesa/drivers/dri/intel_winsys/intel_context.h | 32 ++++++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'src/mesa/drivers/dri/intel_winsys/intel_context.h') diff --git a/src/mesa/drivers/dri/intel_winsys/intel_context.h b/src/mesa/drivers/dri/intel_winsys/intel_context.h index 3a61a5610f..b2c5bfc9a2 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_context.h +++ b/src/mesa/drivers/dri/intel_winsys/intel_context.h @@ -46,6 +46,9 @@ struct st_context; #define INTEL_MAX_FIXUP 64 +/** + * Intel rendering context, contains a state tracker and intel-specific info. + */ struct intel_context { struct st_context *st; @@ -79,6 +82,22 @@ struct intel_context driOptionCache optionCache; }; + + +/** + * Intel framebuffer. + */ +struct intel_framebuffer +{ + struct st_framebuffer *stfb; + + /* other fields TBD */ + int other; +}; + + + + /* These are functions now: */ void LOCK_HARDWARE( struct intel_context *intel ); @@ -124,10 +143,7 @@ extern int __intel_debug; #define PCI_CHIP_Q33_G 0x29D2 -/*====================================================================== - * Inline conversion functions. - * These are better-typed than the macros used previously: - */ +/** Cast wrapper */ static INLINE struct intel_context * intel_context(GLcontext * ctx) { @@ -135,4 +151,12 @@ intel_context(GLcontext * ctx) } +/** Cast wrapper */ +static INLINE struct intel_framebuffer * +intel_framebuffer(__DRIdrawablePrivate * driDrawPriv) +{ + return (struct intel_framebuffer *) driDrawPriv->driverPrivate; +} + + #endif -- cgit v1.2.3