#include "main/mtypes.h"
#include "shader/prog_execute.h"
#include "swrast.h"
#include "s_span.h"
Data Structures | |
struct | SWcontext |
Per-context state that's private to the software rasterizer module. More... | |
Defines | |
#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 | MULTI_DRAW_BIT 0x400 |
Write to more than one color-. | |
#define | OCCLUSION_BIT 0x800 |
GL_HP_occlusion_test enabled. | |
#define | TEXTURE_BIT 0x1000 |
Texturing really enabled. | |
#define | FRAGPROG_BIT 0x2000 |
Fragment program enabled. | |
#define | ATIFRAGSHADER_BIT 0x4000 |
ATI Fragment shader enabled. | |
#define | CLAMPING_BIT 0x8000 |
Clamp colors to [0,1]. | |
#define | _SWRAST_NEW_RASTERMASK |
#define | RGBA_PIXEL_SIZE(TYPE) |
Size of an RGBA pixel, in bytes, for given datatype. | |
#define | FIXED_FRAC_BITS 11 |
#define | FIXED_SHIFT FIXED_FRAC_BITS |
#define | FIXED_ONE (1 << FIXED_SHIFT) |
#define | FIXED_HALF (1 << (FIXED_SHIFT-1)) |
#define | FIXED_FRAC_MASK (FIXED_ONE - 1) |
#define | FIXED_INT_MASK (~FIXED_FRAC_MASK) |
#define | FIXED_EPSILON 1 |
#define | FIXED_SCALE ((float) FIXED_ONE) |
#define | FIXED_DBL_SCALE ((double) FIXED_ONE) |
#define | FloatToFixed(X) (IROUND((X) * FIXED_SCALE)) |
#define | FixedToDouble(X) ((X) * (1.0 / FIXED_DBL_SCALE)) |
#define | IntToFixed(I) ((I) << FIXED_SHIFT) |
#define | FixedToInt(X) ((X) >> FIXED_SHIFT) |
#define | FixedToUns(X) (((unsigned int)(X)) >> FIXED_SHIFT) |
#define | FixedCeil(X) (((X) + FIXED_ONE - FIXED_EPSILON) & FIXED_INT_MASK) |
#define | FixedFloor(X) ((X) & FIXED_INT_MASK) |
#define | FixedToFloat(X) ((X) * (1.0F / FIXED_SCALE)) |
#define | PosFloatToFixed(X) FloatToFixed(X) |
#define | SignedFloatToFixed(X) FloatToFixed(X) |
#define | ChanToFixed(X) (X) |
#define | FixedToChan(X) (X) |
#define | ATTRIB_LOOP_BEGIN |
For looping over fragment attributes in the pointe, line triangle rasterizers. | |
#define | ATTRIB_LOOP_END } } |
Typedefs | |
typedef void(* | texture_sample_func )(GLcontext *ctx, const struct gl_texture_object *tObj, GLuint n, const GLfloat texcoords[][4], const GLfloat lambda[], GLfloat rgba[][4]) |
typedef GLuint | n |
typedef GLuint const GLubyte | mask [] |
typedef GLuint const GLubyte GLvoid * | src |
typedef GLuint const GLubyte GLvoid const GLvoid * | dst |
typedef GLuint const GLubyte GLvoid const GLvoid GLenum | chanType |
typedef void(* | swrast_point_func )(GLcontext *ctx, const SWvertex *) |
typedef void(* | swrast_line_func )(GLcontext *ctx, const SWvertex *, const SWvertex *) |
typedef void(* | swrast_tri_func )(GLcontext *ctx, const SWvertex *, const SWvertex *, const SWvertex *) |
typedef void(* | validate_texture_image_func )(GLcontext *ctx, struct gl_texture_object *texObj, GLuint face, GLuint level) |
Functions | |
typedef | void (_ASMAPIP blend_func)(GLcontext *ctx |
void | _swrast_validate_derived (GLcontext *ctx) |
void | _swrast_update_texture_samplers (GLcontext *ctx) |
static INLINE SWcontext * | SWRAST_CONTEXT (GLcontext *ctx) |
Return SWcontext for the given GLcontext. | |
static INLINE const SWcontext * | CONST_SWRAST_CONTEXT (const GLcontext *ctx) |
const version of above | |
static INLINE void | swrast_render_start (GLcontext *ctx) |
Called prior to framebuffer reading/writing. | |
static INLINE void | swrast_render_finish (GLcontext *ctx) |
Called after framebuffer reading/writing. |
#define _SWRAST_NEW_RASTERMASK |
Value:
(_NEW_BUFFERS| \ _NEW_SCISSOR| \ _NEW_COLOR| \ _NEW_DEPTH| \ _NEW_FOG| \ _NEW_PROGRAM| \ _NEW_STENCIL| \ _NEW_TEXTURE| \ _NEW_VIEWPORT| \ _NEW_DEPTH)
#define ATTRIB_LOOP_BEGIN |
Value:
{ \ GLuint a; \ for (a = 0; a < swrast->_NumActiveAttribs; a++) { \ const GLuint attr = swrast->_ActiveAttribs[a];
#define ATTRIB_LOOP_END } } |
#define ChanToFixed | ( | X | ) | (X) |
#define FIXED_DBL_SCALE ((double) FIXED_ONE) |
#define FIXED_EPSILON 1 |
#define FIXED_FRAC_BITS 11 |
#define FIXED_FRAC_MASK (FIXED_ONE - 1) |
#define FIXED_HALF (1 << (FIXED_SHIFT-1)) |
#define FIXED_INT_MASK (~FIXED_FRAC_MASK) |
#define FIXED_ONE (1 << FIXED_SHIFT) |
#define FIXED_SCALE ((float) FIXED_ONE) |
#define FIXED_SHIFT FIXED_FRAC_BITS |
#define FixedCeil | ( | X | ) | (((X) + FIXED_ONE - FIXED_EPSILON) & FIXED_INT_MASK) |
#define FixedFloor | ( | X | ) | ((X) & FIXED_INT_MASK) |
#define FixedToChan | ( | X | ) | (X) |
#define FixedToDouble | ( | X | ) | ((X) * (1.0 / FIXED_DBL_SCALE)) |
#define FixedToFloat | ( | X | ) | ((X) * (1.0F / FIXED_SCALE)) |
#define FixedToInt | ( | X | ) | ((X) >> FIXED_SHIFT) |
#define FixedToUns | ( | X | ) | (((unsigned int)(X)) >> FIXED_SHIFT) |
#define FloatToFixed | ( | X | ) | (IROUND((X) * FIXED_SCALE)) |
#define IntToFixed | ( | I | ) | ((I) << FIXED_SHIFT) |
#define PosFloatToFixed | ( | X | ) | FloatToFixed(X) |
#define RGBA_PIXEL_SIZE | ( | TYPE | ) |
Value:
((TYPE == GL_UNSIGNED_BYTE) ? 4 * sizeof(GLubyte) : \ ((TYPE == GL_UNSIGNED_SHORT) ? 4 * sizeof(GLushort) \ : 4 * sizeof(GLfloat)))
#define SignedFloatToFixed | ( | X | ) | FloatToFixed(X) |
typedef GLuint const GLubyte GLvoid const GLvoid GLenum chanType |
typedef GLuint const GLubyte GLvoid const GLvoid* dst |
typedef GLuint const GLubyte mask[] |
typedef GLuint n |
typedef GLuint const GLubyte GLvoid* src |
typedef void(* swrast_line_func)(GLcontext *ctx, const SWvertex *, const SWvertex *) |
typedef void(* swrast_point_func)(GLcontext *ctx, const SWvertex *) |
typedef void(* swrast_tri_func)(GLcontext *ctx, const SWvertex *, const SWvertex *, const SWvertex *) |
typedef void(* texture_sample_func)(GLcontext *ctx, const struct gl_texture_object *tObj, GLuint n, const GLfloat texcoords[][4], const GLfloat lambda[], GLfloat rgba[][4]) |
typedef void(* validate_texture_image_func)(GLcontext *ctx, struct gl_texture_object *texObj, GLuint face, GLuint level) |
void _swrast_update_texture_samplers | ( | GLcontext * | ctx | ) |
void _swrast_validate_derived | ( | GLcontext * | ctx | ) |
const version of above
Return SWcontext for the given GLcontext.
static INLINE void swrast_render_finish | ( | GLcontext * | ctx | ) | [static] |
Called after framebuffer reading/writing.
static INLINE void swrast_render_start | ( | GLcontext * | ctx | ) | [static] |
Called prior to framebuffer reading/writing.
For drivers that rely on swrast for fallback rendering, this is the driver's opportunity to map renderbuffers and textures.
typedef void | ( | _ASMAPIP | blend_func | ) |