From 36a0ee199ddc5f29273f9761eeed8e18ad5c874f Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 13:38:37 -0700 Subject: expose _mesa_load_tracked_matrices() --- src/mesa/tnl/t_vb_program.c | 14 ++++++++------ src/mesa/tnl/tnl.h | 3 +++ 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 422aae69e2..72a65f89f1 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -38,6 +38,7 @@ #include "prog_statevars.h" #include "prog_execute.h" +#include "tnl.h" #include "t_context.h" #include "t_pipeline.h" @@ -121,11 +122,12 @@ load_transpose_matrix(GLfloat registers[][4], GLuint pos, /** - * Load program parameter registers with tracked matrices (if NV program). - * This only needs to be done per glBegin/glEnd, not per-vertex. + * Load current vertex program's parameter registers with tracked + * matrices (if NV program). This only needs to be done per + * glBegin/glEnd, not per-vertex. */ -static void -load_program_parameters(GLcontext *ctx) +void +_mesa_load_tracked_matrices(GLcontext *ctx) { GLuint i; @@ -160,7 +162,7 @@ load_program_parameters(GLcontext *ctx) continue; } - /* load the matrix values into sequential registers */ + /* load the matrix values into sequential registers */ if (ctx->VertexProgram.TrackMatrixTransform[i] == GL_IDENTITY_NV) { load_matrix(ctx->VertexProgram.Parameters, i*4, mat->m); } @@ -206,7 +208,7 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) #endif if (ctx->VertexProgram.Current->IsNVProgram) { - load_program_parameters(ctx); + _mesa_load_tracked_matrices(ctx); } else { _mesa_load_state_parameters(ctx, program->Base.Parameters); diff --git a/src/mesa/tnl/tnl.h b/src/mesa/tnl/tnl.h index 17cb30adc7..20bed5546d 100644 --- a/src/mesa/tnl/tnl.h +++ b/src/mesa/tnl/tnl.h @@ -82,4 +82,7 @@ _tnl_draw_prims( GLcontext *ctx, GLuint min_index, GLuint max_index); +extern void +_mesa_load_tracked_matrices(GLcontext *ctx); + #endif -- cgit v1.2.3