summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_vb_arbprogram.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/tnl/t_vb_arbprogram.c')
-rw-r--r--src/mesa/tnl/t_vb_arbprogram.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c
index fd7ffcd84c8..c55fc84feaa 100644
--- a/src/mesa/tnl/t_vb_arbprogram.c
+++ b/src/mesa/tnl/t_vb_arbprogram.c
@@ -1354,7 +1354,11 @@ validate_vertex_program( GLcontext *ctx, struct tnl_pipeline_stage *stage )
*/
m->File[FILE_LOCAL_PARAM] = program->Base.LocalParams;
m->File[FILE_ENV_PARAM] = ctx->VertexProgram.Parameters;
- m->File[FILE_STATE_PARAM] = program->Parameters->ParameterValues;
+ /* GL_NV_vertex_programs can't reference GL state */
+ if (program->Parameters)
+ m->File[FILE_STATE_PARAM] = program->Parameters->ParameterValues;
+ else
+ m->File[FILE_STATE_PARAM] = NULL;
}
}