aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/tnl/t_vb_program.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-16 16:33:47 +0000
committermarha <marha@users.sourceforge.net>2011-01-16 16:33:47 +0000
commit5d0def58c0a3124e70076584cadc7c761e1f9e57 (patch)
treee87238976fbf7b0845aaa60876e417ca42146e1a /mesalib/src/mesa/tnl/t_vb_program.c
parent8b668e29799ccd203f12719c6ef92c08027f6592 (diff)
parent367c91bebcdc1f5ba4278b68eb8715218d9640ad (diff)
downloadvcxsrv-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.c7
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,