diff options
author | Brian Paul <[email protected]> | 2002-04-19 14:05:50 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2002-04-19 14:05:50 +0000 |
commit | bf80e1ed620836e2ca0dd3f7d2d4cb187d17563d (patch) | |
tree | 8666b72f2ff74ac9499d2f9668212fcf4f2e3f5b /src/mesa/swrast/s_context.h | |
parent | 05be7ae1253ad68d80816395c3d09665e5619ebc (diff) |
Allocate a sw_span struct in the swrast context instead of allocating it
on the stack frame in the point/line/triangle functions. (Klaus Niederkrueger)
This should solve the performance problem Karl found on Windows.
Diffstat (limited to 'src/mesa/swrast/s_context.h')
-rw-r--r-- | src/mesa/swrast/s_context.h | 79 |
1 files changed, 47 insertions, 32 deletions
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h index cacbc32052f..b0ca5bf1b57 100644 --- a/src/mesa/swrast/s_context.h +++ b/src/mesa/swrast/s_context.h @@ -1,4 +1,4 @@ -/* $Id: s_context.h,v 1.16 2002/02/02 21:40:33 brianp Exp $ */ +/* $Id: s_context.h,v 1.17 2002/04/19 14:05:50 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -27,6 +27,12 @@ * Keith Whitwell <[email protected]> */ +/** + * \file swrast/s_context.h + * \brief fill in description + * \author Keith Whitwell <[email protected]> + */ + #ifndef S_CONTEXT_H #define S_CONTEXT_H @@ -64,24 +70,25 @@ typedef void (*swrast_tri_func)( GLcontext *ctx, const SWvertex *, const SWvertex *, const SWvertex *); - -/* - * Bitmasks to indicate which rasterization options are enabled (RasterMask) +/** \defgroup Bitmasks + * Bitmasks to indicate which rasterization options are enabled + * (RasterMask) */ -#define ALPHATEST_BIT 0x001 /* Alpha-test pixels */ -#define BLEND_BIT 0x002 /* Blend pixels */ -#define DEPTH_BIT 0x004 /* Depth-test pixels */ -#define FOG_BIT 0x008 /* Fog pixels */ -#define LOGIC_OP_BIT 0x010 /* Apply logic op in software */ -#define CLIP_BIT 0x020 /* Scissor or window clip pixels */ -#define STENCIL_BIT 0x040 /* Stencil pixels */ -#define MASKING_BIT 0x080 /* Do glColorMask or glIndexMask */ -#define ALPHABUF_BIT 0x100 /* Using software alpha buffer */ -#define MULTI_DRAW_BIT 0x400 /* Write to more than one color- */ - /* buffer or no buffers. */ -#define OCCLUSION_BIT 0x800 /* GL_HP_occlusion_test enabled */ -#define TEXTURE_BIT 0x1000 /* Texturing really enabled */ - +/*@{*/ +#define ALPHATEST_BIT 0x001 /**< Alpha-test pixels */ +#define BLEND_BIT 0x002 /**< Blend pixels */ +#define DEPTH_BIT 0x004 /**< Depth-test pixels */ +#define FOG_BIT 0x008 /**< Fog pixels */ +#define LOGIC_OP_BIT 0x010 /**< Apply logic op in software */ +#define CLIP_BIT 0x020 /**< Scissor or window clip pixels */ +#define STENCIL_BIT 0x040 /**< Stencil pixels */ +#define MASKING_BIT 0x080 /**< Do glColorMask or glIndexMask */ +#define ALPHABUF_BIT 0x100 /**< Using software alpha buffer */ +#define MULTI_DRAW_BIT 0x400 /**< Write to more than one color- */ + /**< buffer or no buffers. */ +#define OCCLUSION_BIT 0x800 /**< GL_HP_occlusion_test enabled */ +#define TEXTURE_BIT 0x1000 /**< Texturing really enabled */ +/*@}*/ #define _SWRAST_NEW_RASTERMASK (_NEW_BUFFERS| \ _NEW_SCISSOR| \ @@ -94,20 +101,23 @@ typedef void (*swrast_tri_func)( GLcontext *ctx, const SWvertex *, _NEW_DEPTH) - +/** + * \struct SWcontext + * \brief SWContext? + */ typedef struct { - /* Driver interface: + /** Driver interface: */ struct swrast_device_driver Driver; - /* Configuration mechanisms to make software rasterizer match + /** Configuration mechanisms to make software rasterizer match * characteristics of the hardware rasterizer (if present): */ GLboolean AllowVertexFog; GLboolean AllowPixelFog; - /* Derived values, invalidated on statechanges, updated from + /** Derived values, invalidated on statechanges, updated from * _swrast_validate_derived(): */ GLuint _RasterMask; @@ -117,20 +127,20 @@ typedef struct /* Accum buffer temporaries. */ - GLboolean _IntegerAccumMode; /* Storing unscaled integers? */ - GLfloat _IntegerAccumScaler; /* Implicit scale factor */ + GLboolean _IntegerAccumMode; /**< Storing unscaled integers? */ + GLfloat _IntegerAccumScaler; /**< Implicit scale factor */ /* Working values: */ - GLuint StippleCounter; /* Line stipple counter */ + GLuint StippleCounter; /**< Line stipple counter */ GLuint NewState; GLuint StateChanges; - - /* Mechanism to allow driver (like X11) to register further + /** Mechanism to allow driver (like X11) to register further * software rasterization routines. */ + /*@{*/ void (*choose_point)( GLcontext * ); void (*choose_line)( GLcontext * ); void (*choose_triangle)( GLcontext * ); @@ -138,25 +148,30 @@ typedef struct GLuint invalidate_point; GLuint invalidate_line; GLuint invalidate_triangle; + /*@}*/ - - /* Function pointers for dispatch behind public entrypoints. - */ + /** Function pointers for dispatch behind public entrypoints. */ + /*@{*/ void (*InvalidateState)( GLcontext *ctx, GLuint new_state ); swrast_point_func Point; swrast_line_func Line; swrast_tri_func Triangle; + /*@}*/ - /* Placeholders for when separate specular (or secondary color) is + /** + * Placeholders for when separate specular (or secondary color) is * enabled but texturing is not. */ + /*@{*/ swrast_point_func SpecPoint; swrast_line_func SpecLine; swrast_tri_func SpecTriangle; + /*@}*/ + struct sw_span *span; - /* Internal hooks, kept uptodate by the same mechanism as above. + /** Internal hooks, kept uptodate by the same mechanism as above. */ blend_func BlendFunc; TextureSampleFunc TextureSample[MAX_TEXTURE_UNITS]; |