diff options
-rw-r--r-- | src/mesa/main/context.c | 4 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 3 | ||||
-rw-r--r-- | src/mesa/main/state.c | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 8fd9af760ef..a50632615d0 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1237,7 +1237,11 @@ _mesa_initialize_context( GLcontext *ctx, #endif ctx->_MaintainTexEnvProgram = (_mesa_getenv("MESA_TEX_PROG") != NULL); + ctx->_UseTexEnvProgram = ctx->_MaintainTexEnvProgram; + ctx->_MaintainTnlProgram = (_mesa_getenv("MESA_TNL_PROG") != NULL); + if (ctx->_MaintainTnlProgram) + ctx->_MaintainTexEnvProgram = 1; /* this is required... */ ctx->FirstTimeCurrent = GL_TRUE; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 3a7ae03b459..81f10cb1f73 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2803,8 +2803,9 @@ struct __GLcontextRec struct fragment_program *_TexEnvProgram; /**< Texture state as fragment program */ struct vertex_program *_TnlProgram; /**< Fixed func TNL state as vertex program */ - GLboolean _MaintainTexEnvProgram; GLboolean _MaintainTnlProgram; + GLboolean _MaintainTexEnvProgram; + GLboolean _UseTexEnvProgram; struct gl_query_state Query; /**< GL_ARB_occlusion_query */ diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 57fa4a836c8..56cb358c4a3 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -949,7 +949,9 @@ update_program(GLcontext *ctx) ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0); ctx->FragmentProgram._Current = ctx->_TexEnvProgram; - ctx->FragmentProgram._Active = GL_TRUE; + + if (ctx->_UseTexEnvProgram) + ctx->FragmentProgram._Active = GL_TRUE; } } |