From dba21ed913da2222e3b55fc8ba724ca93acbabf1 Mon Sep 17 00:00:00 2001 From: Nicolai Haehnle Date: Mon, 2 Apr 2007 20:59:51 +0200 Subject: [PATCH] Fix in t_vp_build: Missed necessary updates sometimes _mesa_update_state doesn't always reset VertexProgram._Current to NULL. This caused us to skip a necessary update of the fixed function vertex program sometimes. Change the logic such that we check for updates whenever the _Current program is either NULL or the program generated by t_vp_build. --- src/mesa/tnl/t_vp_build.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 63c99ee6ca0..dff062a417c 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -1506,7 +1506,8 @@ void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx ) GLuint hash; const struct gl_vertex_program *prev = ctx->VertexProgram._Current; - if (!ctx->VertexProgram._Current) { + if (!ctx->VertexProgram._Current || + ctx->VertexProgram._Current == ctx->VertexProgram._TnlProgram) { /* Grab all the relevent state and put it in a single structure: */ key = make_state_key(ctx); -- 2.30.2