_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.
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);