diff options
-rw-r--r-- | src/mesa/shader/nvprogram.c | 7 | ||||
-rw-r--r-- | src/mesa/shader/nvvertexec.c | 18 | ||||
-rw-r--r-- | src/mesa/shader/nvvertexec.h | 12 |
3 files changed, 28 insertions, 9 deletions
diff --git a/src/mesa/shader/nvprogram.c b/src/mesa/shader/nvprogram.c index 47d2b61a628..0e9a01dcab8 100644 --- a/src/mesa/shader/nvprogram.c +++ b/src/mesa/shader/nvprogram.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 6.5.2 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * @@ -77,10 +77,7 @@ _mesa_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params) return; } - _mesa_init_vp_per_vertex_registers(ctx); - _mesa_init_vp_per_primitive_registers(ctx); - COPY_4V(ctx->VertexProgram.Machine.Inputs[VERT_ATTRIB_POS], params); - _mesa_exec_vertex_program(ctx, vprog); + _mesa_exec_vertex_state_program(ctx, vprog, params); } diff --git a/src/mesa/shader/nvvertexec.c b/src/mesa/shader/nvvertexec.c index 19855936593..a4c5728d593 100644 --- a/src/mesa/shader/nvvertexec.c +++ b/src/mesa/shader/nvvertexec.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.2 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * @@ -805,6 +805,22 @@ _mesa_exec_vertex_program(GLcontext *ctx, const struct gl_vertex_program *progra } +/** + * Execute a vertex state program. + * \sa _mesa_ExecuteProgramNV + */ +void +_mesa_exec_vertex_state_program(GLcontext *ctx, + struct gl_vertex_program *vprog, + const GLfloat *params) +{ + _mesa_init_vp_per_vertex_registers(ctx); + _mesa_init_vp_per_primitive_registers(ctx); + COPY_4V(ctx->VertexProgram.Machine.Inputs[VERT_ATTRIB_POS], params); + _mesa_exec_vertex_program(ctx, vprog); +} + + /** Thoughts on vertex program optimization: diff --git a/src/mesa/shader/nvvertexec.h b/src/mesa/shader/nvvertexec.h index e0fd46a7662..e7c5be09e64 100644 --- a/src/mesa/shader/nvvertexec.h +++ b/src/mesa/shader/nvvertexec.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.5.2 * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2006 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"), @@ -35,7 +35,13 @@ extern void _mesa_init_vp_per_primitive_registers(GLcontext *ctx); extern void -_mesa_exec_vertex_program(GLcontext *ctx, const struct gl_vertex_program *program); +_mesa_exec_vertex_program(GLcontext *ctx, + const struct gl_vertex_program *program); + +extern void +_mesa_exec_vertex_state_program(GLcontext *ctx, + struct gl_vertex_program *vprog, + const GLfloat *params); extern void _mesa_dump_vp_state( const struct gl_vertex_program_state *state ); |