diff options
author | marha <marha@users.sourceforge.net> | 2011-01-16 16:33:47 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-01-16 16:33:47 +0000 |
commit | 5d0def58c0a3124e70076584cadc7c761e1f9e57 (patch) | |
tree | e87238976fbf7b0845aaa60876e417ca42146e1a /mesalib/src/mesa/tnl/t_vb_program.c | |
parent | 8b668e29799ccd203f12719c6ef92c08027f6592 (diff) | |
parent | 367c91bebcdc1f5ba4278b68eb8715218d9640ad (diff) | |
download | vcxsrv-5d0def58c0a3124e70076584cadc7c761e1f9e57.tar.gz vcxsrv-5d0def58c0a3124e70076584cadc7c761e1f9e57.tar.bz2 vcxsrv-5d0def58c0a3124e70076584cadc7c761e1f9e57.zip |
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/tnl/t_vb_program.c')
-rw-r--r-- | mesalib/src/mesa/tnl/t_vb_program.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mesalib/src/mesa/tnl/t_vb_program.c b/mesalib/src/mesa/tnl/t_vb_program.c index ea5717a7a..4b1a212fd 100644 --- a/mesalib/src/mesa/tnl/t_vb_program.c +++ b/mesalib/src/mesa/tnl/t_vb_program.c @@ -220,7 +220,8 @@ _tnl_program_string(struct gl_context *ctx, GLenum target, struct gl_program *pr * Initialize virtual machine state prior to executing vertex program.
*/
static void
-init_machine(struct gl_context *ctx, struct gl_program_machine *machine)
+init_machine(struct gl_context *ctx, struct gl_program_machine *machine,
+ GLuint instID)
{
/* Input registers get initialized from the current vertex attribs */
memcpy(machine->VertAttribs, ctx->Current.Attrib,
@@ -256,6 +257,8 @@ init_machine(struct gl_context *ctx, struct gl_program_machine *machine) machine->FetchTexelDeriv = NULL; /* not used by vertex programs */
machine->Samplers = ctx->VertexProgram._Current->Base.SamplerUnits;
+
+ machine->SystemValues[SYSTEM_VALUE_INSTANCE_ID][0] = (GLfloat) instID;
}
@@ -341,7 +344,7 @@ run_vp( struct gl_context *ctx, struct tnl_pipeline_stage *stage ) for (i = 0; i < VB->Count; i++) {
GLuint attr;
- init_machine(ctx, machine);
+ init_machine(ctx, machine, tnl->CurInstance);
#if 0
printf("Input %d: %f, %f, %f, %f\n", i,
|