summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2007-04-02 20:59:51 +0200
committerNicolai Haehnle <nhaehnle@gmail.com>2007-04-02 21:01:32 +0200
commitdba21ed913da2222e3b55fc8ba724ca93acbabf1 (patch)
treeca183aca675b8ebe0e5ef44f6f4f226567642377 /src/mesa/tnl
parent66d336808d3eb01eab42fb311b932bfe9f7c6b1c (diff)
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.
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_vp_build.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c
index 63c99ee6ca..dff062a417 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);