From: Nicolai Haehnle Date: Mon, 2 Apr 2007 18:59:51 +0000 (+0200) Subject: Fix in t_vp_build: Missed necessary updates sometimes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dba21ed913da2222e3b55fc8ba724ca93acbabf1;p=mesa.git 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. --- 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);