core | glapi | vbo | math | shader | swrast | swrast_setup | tnl | tnl_dd

s_context.c File Reference

#include "main/imports.h"
#include "main/bufferobj.h"
#include "main/context.h"
#include "main/colormac.h"
#include "main/mtypes.h"
#include "main/teximage.h"
#include "shader/prog_parameter.h"
#include "shader/prog_statevars.h"
#include "swrast.h"
#include "s_blend.h"
#include "s_context.h"
#include "s_lines.h"
#include "s_points.h"
#include "s_span.h"
#include "s_triangle.h"
#include "s_texfilter.h"

Defines

#define _SWRAST_NEW_DERIVED
#define _SWRAST_NEW_TRIANGLE
#define _SWRAST_NEW_LINE
#define _SWRAST_NEW_POINT
#define _SWRAST_NEW_TEXTURE_SAMPLE_FUNC   _NEW_TEXTURE
#define _SWRAST_NEW_TEXTURE_ENV_MODE   _NEW_TEXTURE
#define _SWRAST_NEW_BLEND_FUNC   _NEW_COLOR
#define SWRAST_DEBUG   0
#define SWRAST_DEBUG_VERTICES   0

Functions

static void _swrast_update_rasterflags (GLcontext *ctx)
 Recompute the value of swrast->_RasterMask, etc.
static void _swrast_update_polygon (GLcontext *ctx)
 Examine polygon cull state to compute the _BackfaceCullSign field.
static void _swrast_update_fog_hint (GLcontext *ctx)
 Update the _PreferPixelFog field to indicate if we need to compute fog blend factors (from the fog coords) per-fragment.
static void _swrast_update_texture_env (GLcontext *ctx)
 Update the swrast->_TextureCombinePrimary flag.
static void _swrast_update_deferred_texture (GLcontext *ctx)
 Determine if we can defer texturing/shading until after Z/stencil testing.
static void _swrast_update_fog_state (GLcontext *ctx)
 Update swrast->_FogColor and swrast->_FogEnable values.
static void _swrast_update_fragment_program (GLcontext *ctx, GLbitfield newState)
 Update state for running fragment programs.
static void _swrast_update_specular_vertex_add (GLcontext *ctx)
 See if we can do early diffuse+specular (primary+secondary) color add per vertex instead of per-fragment.
static void _swrast_validate_triangle (GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2)
 Stub for swrast->Triangle to select a true triangle function after a state change.
static void _swrast_validate_line (GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
 Called via swrast->Line.
static void _swrast_validate_point (GLcontext *ctx, const SWvertex *v0)
 Called via swrast->Point.
static void _ASMAPI _swrast_validate_blend_func (GLcontext *ctx, GLuint n, const GLubyte mask[], GLvoid *src, const GLvoid *dst, GLenum chanType)
 Called via swrast->BlendFunc.
static void _swrast_validate_texture_images (GLcontext *ctx)
 Make sure we have texture image data for all the textures we may need for subsequent rendering.
void _swrast_eject_texture_images (GLcontext *ctx)
 Free the texture image data attached to all currently enabled textures.
static void _swrast_sleep (GLcontext *ctx, GLbitfield new_state)
static void _swrast_invalidate_state (GLcontext *ctx, GLbitfield new_state)
void _swrast_update_texture_samplers (GLcontext *ctx)
static void _swrast_update_active_attribs (GLcontext *ctx)
 Update swrast->_ActiveAttribs, swrast->_NumActiveAttribs, swrast->_ActiveAtttribMask.
void _swrast_validate_derived (GLcontext *ctx)
void _swrast_Quad (GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2, const SWvertex *v3)
void _swrast_Triangle (GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2)
void _swrast_Line (GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
void _swrast_Point (GLcontext *ctx, const SWvertex *v0)
void _swrast_InvalidateState (GLcontext *ctx, GLbitfield new_state)
void _swrast_ResetLineStipple (GLcontext *ctx)
void _swrast_SetFacing (GLcontext *ctx, GLuint facing)
 Indicates front/back facing for subsequent points/lines when drawing unfilled polygons.
void _swrast_allow_vertex_fog (GLcontext *ctx, GLboolean value)
void _swrast_allow_pixel_fog (GLcontext *ctx, GLboolean value)
GLboolean _swrast_CreateContext (GLcontext *ctx)
void _swrast_DestroyContext (GLcontext *ctx)
struct swrast_device_driver * _swrast_GetDeviceDriverReference (GLcontext *ctx)
void _swrast_flush (GLcontext *ctx)
void _swrast_render_primitive (GLcontext *ctx, GLenum prim)
void _swrast_render_start (GLcontext *ctx)
void _swrast_render_finish (GLcontext *ctx)
void _swrast_print_vertex (GLcontext *ctx, const SWvertex *v)


Define Documentation

#define _SWRAST_NEW_BLEND_FUNC   _NEW_COLOR

#define _SWRAST_NEW_DERIVED

Value:

#define _SWRAST_NEW_LINE

Value:

#define _SWRAST_NEW_POINT

Value:

#define _SWRAST_NEW_TEXTURE_ENV_MODE   _NEW_TEXTURE

#define _SWRAST_NEW_TEXTURE_SAMPLE_FUNC   _NEW_TEXTURE

#define _SWRAST_NEW_TRIANGLE

Value:

#define SWRAST_DEBUG   0

#define SWRAST_DEBUG_VERTICES   0


Function Documentation

void _swrast_allow_pixel_fog ( GLcontext *  ctx,
GLboolean  value 
)

void _swrast_allow_vertex_fog ( GLcontext *  ctx,
GLboolean  value 
)

GLboolean _swrast_CreateContext ( GLcontext *  ctx  ) 

void _swrast_DestroyContext ( GLcontext *  ctx  ) 

void _swrast_eject_texture_images ( GLcontext *  ctx  ) 

Free the texture image data attached to all currently enabled textures.

Meant to be called by device drivers when transitioning from software to hardware rendering.

void _swrast_flush ( GLcontext *  ctx  ) 

struct swrast_device_driver* _swrast_GetDeviceDriverReference ( GLcontext *  ctx  )  [read]

static void _swrast_invalidate_state ( GLcontext *  ctx,
GLbitfield  new_state 
) [static]

void _swrast_InvalidateState ( GLcontext *  ctx,
GLbitfield  new_state 
)

void _swrast_Line ( GLcontext *  ctx,
const SWvertex *  v0,
const SWvertex *  v1 
)

void _swrast_Point ( GLcontext *  ctx,
const SWvertex *  v0 
)

void _swrast_print_vertex ( GLcontext *  ctx,
const SWvertex *  v 
)

void _swrast_Quad ( GLcontext *  ctx,
const SWvertex *  v0,
const SWvertex *  v1,
const SWvertex *  v2,
const SWvertex *  v3 
)

void _swrast_render_finish ( GLcontext *  ctx  ) 

void _swrast_render_primitive ( GLcontext *  ctx,
GLenum  prim 
)

void _swrast_render_start ( GLcontext *  ctx  ) 

void _swrast_ResetLineStipple ( GLcontext *  ctx  ) 

void _swrast_SetFacing ( GLcontext *  ctx,
GLuint  facing 
)

Indicates front/back facing for subsequent points/lines when drawing unfilled polygons.

Needed for two-side stencil.

static void _swrast_sleep ( GLcontext *  ctx,
GLbitfield  new_state 
) [static]

void _swrast_Triangle ( GLcontext *  ctx,
const SWvertex *  v0,
const SWvertex *  v1,
const SWvertex *  v2 
)

static void _swrast_update_active_attribs ( GLcontext *  ctx  )  [static]

Update swrast->_ActiveAttribs, swrast->_NumActiveAttribs, swrast->_ActiveAtttribMask.

static void _swrast_update_deferred_texture ( GLcontext *  ctx  )  [static]

Determine if we can defer texturing/shading until after Z/stencil testing.

This potentially allows us to skip texturing/shading for lots of fragments.

static void _swrast_update_fog_hint ( GLcontext *  ctx  )  [static]

Update the _PreferPixelFog field to indicate if we need to compute fog blend factors (from the fog coords) per-fragment.

static void _swrast_update_fog_state ( GLcontext *  ctx  )  [static]

Update swrast->_FogColor and swrast->_FogEnable values.

static void _swrast_update_fragment_program ( GLcontext *  ctx,
GLbitfield  newState 
) [static]

Update state for running fragment programs.

Basically, load the program parameters with current state values.

static void _swrast_update_polygon ( GLcontext *  ctx  )  [static]

Examine polygon cull state to compute the _BackfaceCullSign field.

_BackfaceCullSign will be 0 if no culling, -1 if culling back-faces, and 1 if culling front-faces. The Polygon FrontFace state also factors in.

static void _swrast_update_rasterflags ( GLcontext *  ctx  )  [static]

Recompute the value of swrast->_RasterMask, etc.

according to the current context. The _RasterMask field can be easily tested by drivers to determine certain basic GL state (does the primitive need stenciling, logic-op, fog, etc?).

static void _swrast_update_specular_vertex_add ( GLcontext *  ctx  )  [static]

See if we can do early diffuse+specular (primary+secondary) color add per vertex instead of per-fragment.

static void _swrast_update_texture_env ( GLcontext *  ctx  )  [static]

Update the swrast->_TextureCombinePrimary flag.

void _swrast_update_texture_samplers ( GLcontext *  ctx  ) 

static void _ASMAPI _swrast_validate_blend_func ( GLcontext *  ctx,
GLuint  n,
const GLubyte  mask[],
GLvoid *  src,
const GLvoid *  dst,
GLenum  chanType 
) [static]

Called via swrast->BlendFunc.

Examine GL state to choose a blending function, then call it.

void _swrast_validate_derived ( GLcontext *  ctx  ) 

static void _swrast_validate_line ( GLcontext *  ctx,
const SWvertex *  v0,
const SWvertex *  v1 
) [static]

Called via swrast->Line.

Examine current GL state and choose a software line routine. Then call it.

static void _swrast_validate_point ( GLcontext *  ctx,
const SWvertex *  v0 
) [static]

Called via swrast->Point.

Examine current GL state and choose a software point routine. Then call it.

static void _swrast_validate_texture_images ( GLcontext *  ctx  )  [static]

Make sure we have texture image data for all the textures we may need for subsequent rendering.

static void _swrast_validate_triangle ( GLcontext *  ctx,
const SWvertex *  v0,
const SWvertex *  v1,
const SWvertex *  v2 
) [static]

Stub for swrast->Triangle to select a true triangle function after a state change.


Generated on Sun Sep 27 06:48:05 2009 for Mesa Software Rasterization (swrast) by  doxygen 1.5.4