diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2004-04-21 18:09:14 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2004-04-21 18:09:14 +0000 |
commit | 05a6f2fd484bab59c6e6a381f58808adc26619f1 (patch) | |
tree | 6e946ed3619b65fbf5d9f77d5e214dcf40eedbfe /src/mesa/tnl | |
parent | 6164ae2b5a7ad00181aa2a80634e80e58c8c3fb6 (diff) |
Fix up some assorted issues with initialization of vertex program registers.
Some need to be set per-vertex, other per-primitive. Cleared that up.
Only need to init temp/result registers if executing an NV vertex program.
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r-- | src/mesa/tnl/t_vb_program.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 62141ad124..a6c9bc8038 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 5.1 + * Version: 6.1 * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -91,7 +91,8 @@ struct vp_stage_data { /** * This function executes vertex programs */ -static GLboolean run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) +static GLboolean +run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) { TNLcontext *tnl = TNL_CONTEXT(ctx); struct vp_stage_data *store = VP_STAGE_DATA(stage); @@ -99,12 +100,14 @@ static GLboolean run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) struct vertex_program *program = ctx->VertexProgram.Current; GLuint i; - _mesa_init_tracked_matrices(ctx); /* load registers with matrices */ - _mesa_init_vp_registers(ctx); /* init temp and result regs */ + /* load program parameter registers (they're read-only) */ + _mesa_init_vp_per_primitive_registers(ctx); for (i = 0; i < VB->Count; i++) { GLuint attr; + _mesa_init_vp_per_vertex_registers(ctx); + #if 0 printf("Input %d: %f, %f, %f, %f\n", i, VB->AttribPtr[0]->data[i][0], |