summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-04-16 16:04:52 +0200
committerMarek Olšák <[email protected]>2012-04-19 14:47:21 +0200
commitfb4a34e60eb4c1bdc7b0fdcd98d1bf3038c354e8 (patch)
tree2ff5a515361c0cd9b57a75b67f9026ce6d72e007 /src/mesa
parent576c8c592a4be7047a00b0c8fe3851b09f10d8d4 (diff)
mesa: set _NEW_VARYING_VP_INPUTS flag only if fixed-func VP is enabled & valid
Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/state.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 627bf838c0f..6efc45a43f4 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -627,7 +627,16 @@ _mesa_set_varying_vp_inputs( struct gl_context *ctx,
{
if (ctx->varying_vp_inputs != varying_inputs) {
ctx->varying_vp_inputs = varying_inputs;
- ctx->NewState |= _NEW_VARYING_VP_INPUTS;
+
+ /* Only the fixed-func generated programs need to use the flag
+ * and the fixed-func fragment program uses it only if there is also
+ * a fixed-func vertex program, so this only depends on the latter.
+ *
+ * It's okay to check the VP pointer here, because this is called after
+ * _mesa_update_state in the vbo module. */
+ if (ctx->VertexProgram._TnlProgram) {
+ ctx->NewState |= _NEW_VARYING_VP_INPUTS;
+ }
/*printf("%s %x\n", __FUNCTION__, varying_inputs);*/
}
}