From 05a6f2fd484bab59c6e6a381f58808adc26619f1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 21 Apr 2004 18:09:14 +0000 Subject: 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. --- src/mesa/tnl/t_vb_program.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/mesa/tnl/t_vb_program.c') 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], -- cgit v1.2.3