diff options
author | Zou Nan hai <nanhai.zou@intel.com> | 2007-07-04 10:52:35 +0800 |
---|---|---|
committer | Zou Nan hai <nanhai.zou@intel.com> | 2007-07-04 10:52:35 +0800 |
commit | fb9ee9b323bff93973a39560b2bc007aace4bddd (patch) | |
tree | 05e1e72e8f4d321cde2c48b8518e6d9736c680dd /src/mesa/drivers/dri/r300/radeon_context.h | |
parent | 285b326c606e9b2f90e4fe177b15b3fa23239b86 (diff) | |
parent | 7ff4359a3be1278b26950f96ab23014a667af838 (diff) |
Merge branch 'master' of git+ssh://znh@git.freedesktop.org/git/mesa/mesa into 965-glsl
Diffstat (limited to 'src/mesa/drivers/dri/r300/radeon_context.h')
-rw-r--r-- | src/mesa/drivers/dri/r300/radeon_context.h | 53 |
1 files changed, 22 insertions, 31 deletions
diff --git a/src/mesa/drivers/dri/r300/radeon_context.h b/src/mesa/drivers/dri/r300/radeon_context.h index 07a0c7cbd6..2f239417a9 100644 --- a/src/mesa/drivers/dri/r300/radeon_context.h +++ b/src/mesa/drivers/dri/r300/radeon_context.h @@ -1,10 +1,15 @@ -/* +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + VA Linux Systems Inc., Fremont, California. Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. The Weather Channel (TM) funded Tungsten Graphics to develop the initial release of the Radeon 8500 driver under the XFree86 license. This notice must be preserved. +All Rights Reserved. + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including @@ -29,7 +34,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* * Authors: + * Gareth Hughes <gareth@valinux.com> * Keith Whitwell <keith@tungstengraphics.com> + * Kevin E. Martin <martin@valinux.com> * Nicolai Haehnle <prefect_@gmx.net> */ @@ -44,20 +51,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. struct radeon_context; typedef struct radeon_context radeonContextRec; -typedef struct radeon_context* radeonContextPtr; - -static __inline GLuint radeonPackColor(GLuint cpp, - GLubyte r, GLubyte g, GLubyte b, GLubyte a) -{ - switch (cpp) { - case 2: - return PACK_COLOR_565(r, g, b); - case 4: - return PACK_COLOR_8888(a, r, g, b); - default: - return 0; - } -} +typedef struct radeon_context *radeonContextPtr; #define TEX_0 0x1 #define TEX_1 0x2 @@ -69,17 +63,16 @@ static __inline GLuint radeonPackColor(GLuint cpp, #define TEX_7 0x80 #define TEX_ALL 0xff - /* Rasterizing fallbacks */ /* See correponding strings in r200_swtcl.c */ -#define RADEON_FALLBACK_TEXTURE 0x01 -#define RADEON_FALLBACK_DRAW_BUFFER 0x02 -#define RADEON_FALLBACK_STENCIL 0x04 -#define RADEON_FALLBACK_RENDER_MODE 0x08 -#define RADEON_FALLBACK_BLEND_EQ 0x10 -#define RADEON_FALLBACK_BLEND_FUNC 0x20 -#define RADEON_FALLBACK_DISABLE 0x40 -#define RADEON_FALLBACK_BORDER_MODE 0x80 +#define RADEON_FALLBACK_TEXTURE 0x0001 +#define RADEON_FALLBACK_DRAW_BUFFER 0x0002 +#define RADEON_FALLBACK_STENCIL 0x0004 +#define RADEON_FALLBACK_RENDER_MODE 0x0008 +#define RADEON_FALLBACK_BLEND_EQ 0x0010 +#define RADEON_FALLBACK_BLEND_FUNC 0x0020 +#define RADEON_FALLBACK_DISABLE 0x0040 +#define RADEON_FALLBACK_BORDER_MODE 0x0080 #if R200_MERGED extern void radeonFallback(GLcontext * ctx, GLuint bit, GLboolean mode); @@ -116,19 +109,18 @@ extern void radeonTclFallback(GLcontext * ctx, GLuint bit, GLboolean mode); #define TCL_FALLBACK( ctx, bit, mode ) ; #endif - struct radeon_dri_mirror { __DRIcontextPrivate *context; /* DRI context */ __DRIscreenPrivate *screen; /* DRI screen */ /** * DRI drawable bound to this context for drawing. */ - __DRIdrawablePrivate *drawable; + __DRIdrawablePrivate *drawable; /** * DRI drawable bound to this context for reading. */ - __DRIdrawablePrivate *readable; + __DRIdrawablePrivate *readable; drm_context_t hwContext; drm_hw_lock_t *hwLock; @@ -164,7 +156,7 @@ struct radeon_state { * structure. */ struct radeon_context { - GLcontext *glCtx; /* Mesa context */ + GLcontext *glCtx; /* Mesa context */ radeonScreenPtr radeonScreen; /* Screen private DRI data */ /* Fallback state */ @@ -200,7 +192,6 @@ struct radeon_context { GLuint swap_count; GLuint swap_missed_count; - /* Derived state */ struct radeon_state state; @@ -215,7 +206,7 @@ extern void radeonSwapBuffers(__DRIdrawablePrivate * dPriv); extern void radeonCopySubBuffer(__DRIdrawablePrivate * dPriv, int x, int y, int w, int h); extern GLboolean radeonInitContext(radeonContextPtr radeon, - struct dd_function_table* functions, + struct dd_function_table *functions, const __GLcontextModes * glVisual, __DRIcontextPrivate * driContextPriv, void *sharedContextPrivate); @@ -252,4 +243,4 @@ extern int RADEON_DEBUG; #define DEBUG_PIXEL 0x2000 #define DEBUG_MEMORY 0x4000 -#endif /* __RADEON_CONTEXT_H__ */ +#endif /* __RADEON_CONTEXT_H__ */ |