summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_vb_program.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-02-25 12:47:25 -0700
committerBrian <[email protected]>2007-02-25 12:47:25 -0700
commit9854a17f292193c9720cf25ab00818ecc210f911 (patch)
treee5957a83a7eab1a1fd9d125a2e23458beb16fcff /src/mesa/tnl/t_vb_program.c
parent21625d729cc7050fc1b0991e1753b0b5f45a6db0 (diff)
only copy used outputs
Diffstat (limited to 'src/mesa/tnl/t_vb_program.c')
-rw-r--r--src/mesa/tnl/t_vb_program.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c
index 62c78dc7d10..82e007a3ac1 100644
--- a/src/mesa/tnl/t_vb_program.c
+++ b/src/mesa/tnl/t_vb_program.c
@@ -244,7 +244,7 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage )
const GLuint size = VB->AttribPtr[attr]->size;
const GLuint stride = VB->AttribPtr[attr]->stride;
const GLfloat *data = (GLfloat *) (ptr + stride * i);
- COPY_CLEAN_4V(machine.VertAttribs/*Inputs*/[attr], size, data);
+ COPY_CLEAN_4V(machine.VertAttribs[attr], size, data);
}
}
@@ -264,9 +264,10 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage )
}
/* copy the output registers into the VB->attribs arrays */
- /* XXX (optimize) could use a conditional and smaller loop limit here */
for (attr = 0; attr < VERT_RESULT_MAX; attr++) {
- COPY_4V(store->attribs[attr].data[i], machine.Outputs[attr]);
+ if (program->Base.OutputsWritten & (1 << attr)) {
+ COPY_4V(store->attribs[attr].data[i], machine.Outputs[attr]);
+ }
}
#if 0
printf("HPOS: %f %f %f %f\n",