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

t_vb_program.c File Reference


Detailed Description

Pipeline stage for executing vertex programs.

Author:
Brian Paul, Keith Whitwell

#include "main/glheader.h"
#include "main/colormac.h"
#include "main/context.h"
#include "main/macros.h"
#include "main/imports.h"
#include "shader/prog_instruction.h"
#include "shader/prog_statevars.h"
#include "shader/prog_execute.h"
#include "swrast/s_context.h"
#include "swrast/s_texfilter.h"
#include "tnl/tnl.h"
#include "tnl/t_context.h"
#include "tnl/t_pipeline.h"

Data Structures

struct  vp_stage_data

Defines

#define VP_STAGE_DATA(stage)   ((struct vp_stage_data *)(stage->privatePtr))

Functions

static void userclip (GLcontext *ctx, GLvector4f *clip, GLubyte *clipmask, GLubyte *clipormask, GLubyte *clipandmask)
static GLboolean do_ndc_cliptest (GLcontext *ctx, struct vp_stage_data *store)
static void vp_fetch_texel (GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda, GLuint unit, GLfloat color[4])
 XXX the texture sampling code in this module is a bit of a hack.
void _tnl_program_string (GLcontext *ctx, GLenum target, struct gl_program *program)
 Called via ctx->Driver.ProgramStringNotify() after a new vertex program string has been parsed.
static void init_machine (GLcontext *ctx, struct gl_program_machine *machine)
 Initialize virtual machine state prior to executing vertex program.
static void map_textures (GLcontext *ctx, const struct gl_vertex_program *vp)
 Map the texture images which the vertex program will access (if any).
static void unmap_textures (GLcontext *ctx, const struct gl_vertex_program *vp)
 Unmap the texture images which were used by the vertex program (if any).
static GLboolean run_vp (GLcontext *ctx, struct tnl_pipeline_stage *stage)
 This function executes vertex programs.
static GLboolean init_vp (GLcontext *ctx, struct tnl_pipeline_stage *stage)
 Called the first time stage->run is called.
static void dtr (struct tnl_pipeline_stage *stage)
 Destructor for this pipeline stage.
static void validate_vp_stage (GLcontext *ctx, struct tnl_pipeline_stage *stage)

Variables

struct tnl_pipeline_stage _tnl_vertex_program_stage
 Public description of this pipeline stage.


Define Documentation

#define VP_STAGE_DATA ( stage   )     ((struct vp_stage_data *)(stage->privatePtr))


Function Documentation

void _tnl_program_string ( GLcontext ctx,
GLenum  target,
struct gl_program program 
)

Called via ctx->Driver.ProgramStringNotify() after a new vertex program string has been parsed.

static GLboolean do_ndc_cliptest ( GLcontext ctx,
struct vp_stage_data store 
) [static]

XXX NEW_SLANG _Enabled ???

static void dtr ( struct tnl_pipeline_stage stage  )  [static]

Destructor for this pipeline stage.

static void init_machine ( GLcontext ctx,
struct gl_program_machine *  machine 
) [static]

Initialize virtual machine state prior to executing vertex program.

static GLboolean init_vp ( GLcontext ctx,
struct tnl_pipeline_stage stage 
) [static]

Called the first time stage->run is called.

In effect, don't allocate data until the first time the stage is run.

static void map_textures ( GLcontext ctx,
const struct gl_vertex_program vp 
) [static]

Map the texture images which the vertex program will access (if any).

static GLboolean run_vp ( GLcontext ctx,
struct tnl_pipeline_stage stage 
) [static]

This function executes vertex programs.

static void unmap_textures ( GLcontext ctx,
const struct gl_vertex_program vp 
) [static]

Unmap the texture images which were used by the vertex program (if any).

static void userclip ( GLcontext ctx,
GLvector4f clip,
GLubyte *  clipmask,
GLubyte *  clipormask,
GLubyte *  clipandmask 
) [static]

static void validate_vp_stage ( GLcontext ctx,
struct tnl_pipeline_stage stage 
) [static]

static void vp_fetch_texel ( GLcontext ctx,
const GLfloat  texcoord[4],
GLfloat  lambda,
GLuint  unit,
GLfloat  color[4] 
) [static]

XXX the texture sampling code in this module is a bit of a hack.

The texture sampling code is in swrast, though it doesn't have any real dependencies on the rest of swrast. It should probably be moved into main/ someday.


Variable Documentation

struct tnl_pipeline_stage _tnl_vertex_program_stage

Initial value:

{
   "vertex-program",
   NULL,                        
   init_vp,                     
   dtr,                         
   validate_vp_stage,           
   run_vp                       
}
Public description of this pipeline stage.


Generated on Sun Sep 27 06:48:09 2009 for Mesa Transform and Lighting (tnl) by  doxygen 1.5.4