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

state.h File Reference

#include "mtypes.h"

Functions

void _mesa_update_state (GLcontext *ctx)
void _mesa_update_state_locked (GLcontext *ctx)
 Update the ctx->_TriangleCaps bitfield.
void _mesa_set_varying_vp_inputs (GLcontext *ctx, GLbitfield varying_inputs)
 Want to figure out which fragment program inputs are actually constant/current values from ctx->Current.
void _mesa_set_vp_override (GLcontext *ctx, GLboolean flag)
 Used by drivers to tell core Mesa that the driver is going to install/ use its own vertex program.


Function Documentation

void _mesa_set_varying_vp_inputs ( GLcontext ctx,
GLbitfield  varying_inputs 
)

Want to figure out which fragment program inputs are actually constant/current values from ctx->Current.

These should be referenced as a tracked state variable rather than a fragment program input, to save the overhead of putting a constant value in every submitted vertex, transferring it to hardware, interpolating it across the triangle, etc...

When there is a VP bound, just use vp->outputs. But when we're generating vp from fixed function state, basically want to calculate:

vp_out_2_fp_in( vp_in_2_vp_out( varying_inputs ) | potential_vp_outputs )

Where potential_vp_outputs is calculated by looking at enabled texgen, etc.

The generated fragment program should then only declare inputs that may vary or otherwise differ from the ctx->Current values. Otherwise, the fp should track them as state values instead.

void _mesa_set_vp_override ( GLcontext ctx,
GLboolean  flag 
)

Used by drivers to tell core Mesa that the driver is going to install/ use its own vertex program.

In particular, this will prevent generated fragment programs from using state vars instead of ordinary varyings/inputs.

void _mesa_update_state ( GLcontext ctx  ) 

void _mesa_update_state_locked ( GLcontext ctx  ) 

Update the ctx->_TriangleCaps bitfield.

XXX that bitfield should really go away someday! This function must be called after other update_*() functions since there are dependencies on some other derived values. Compute derived GL state. If __GLcontextRec::NewState is non-zero then this function must be called before rendering anything.

Calls dd_function_table::UpdateState to perform any internal state management necessary.

See also:
_mesa_update_modelview_project(), _mesa_update_texture(), _mesa_update_buffer_bounds(), _mesa_update_lighting() and _mesa_update_tnl_spaces().


Generated on Sun Sep 27 06:47:46 2009 for Mesa Main by  doxygen 1.5.4