diff options
Diffstat (limited to 'src/mesa/main/state.c')
-rw-r--r-- | src/mesa/main/state.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 6ed7ae6c7dd..9ae71c57383 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -964,6 +964,9 @@ update_program(GLcontext *ctx) if (shProg && shProg->LinkStatus) { /* Use shader programs */ + /* XXX this isn't quite right, since we may have either a vertex + * _or_ fragment shader (not always both). + */ ctx->VertexProgram._Current = shProg->VertexProgram; ctx->FragmentProgram._Current = shProg->FragmentProgram; } @@ -1000,6 +1003,13 @@ update_program(GLcontext *ctx) ctx->FragmentProgram._Current = NULL; } } + + ctx->FragmentProgram._Active = ctx->FragmentProgram._Enabled; + if (ctx->FragmentProgram._MaintainTexEnvProgram && + !ctx->FragmentProgram._Enabled) { + if (ctx->FragmentProgram._UseTexEnvProgram) + ctx->FragmentProgram._Active = GL_TRUE; + } } |