aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_context.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-04-15 18:45:06 -0700
committerIan Romanick <[email protected]>2011-04-21 17:33:21 -0700
commitf0188d4b08b84aa72c6d8148ca94e40d665c7b68 (patch)
treecd18ca17719f9c236c0607ce8ebbdecd4376aeca /src/mesa/swrast/s_context.c
parent3aa21f93dc1329c6f956277f2746c2a0bdae5446 (diff)
mesa: gl_fragment_program::FogOption is always GL_NONE so don't check it
Reviewed-by: Eric Anholt <[email protected]> Acked-by: Corbin Simpson <[email protected]> Acked-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/mesa/swrast/s_context.c')
-rw-r--r--src/mesa/swrast/s_context.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index 491fcfcdbbf..b3e39689cfa 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -248,18 +248,11 @@ _swrast_update_fog_state( struct gl_context *ctx )
SWcontext *swrast = SWRAST_CONTEXT(ctx);
const struct gl_fragment_program *fp = ctx->FragmentProgram._Current;
+ assert((fp == NULL) || (fp->Base.Target == GL_FRAGMENT_PROGRAM_ARB));
+
/* determine if fog is needed, and if so, which fog mode */
- swrast->_FogEnabled = GL_FALSE;
- if (fp && fp->Base.Target == GL_FRAGMENT_PROGRAM_ARB) {
- if (fp->FogOption != GL_NONE) {
- swrast->_FogEnabled = GL_TRUE;
- swrast->_FogMode = fp->FogOption;
- }
- }
- else if (ctx->Fog.Enabled) {
- swrast->_FogEnabled = GL_TRUE;
- swrast->_FogMode = ctx->Fog.Mode;
- }
+ swrast->_FogEnabled = (fp == NULL && ctx->Fog.Enabled);
+ swrast->_FogMode = ctx->Fog.Mode;
}