aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_context.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-27 15:56:59 +0000
committermarha <marha@users.sourceforge.net>2011-04-27 15:56:59 +0000
commit100633b3e7619842f345cb7603b0db6b5761dd11 (patch)
tree3c3af754c7e801c07263269837d6a05072ff834c /mesalib/src/mesa/swrast/s_context.c
parent205a4bdae76f287126db9f45a4f0ba631e3efca1 (diff)
parent96d6df5da9cddedf4931bf8e17f96e242467c661 (diff)
downloadvcxsrv-100633b3e7619842f345cb7603b0db6b5761dd11.tar.gz
vcxsrv-100633b3e7619842f345cb7603b0db6b5761dd11.tar.bz2
vcxsrv-100633b3e7619842f345cb7603b0db6b5761dd11.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/swrast/s_context.c')
-rw-r--r--mesalib/src/mesa/swrast/s_context.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/mesalib/src/mesa/swrast/s_context.c b/mesalib/src/mesa/swrast/s_context.c
index b0c9880b1..d5f49923c 100644
--- a/mesalib/src/mesa/swrast/s_context.c
+++ b/mesalib/src/mesa/swrast/s_context.c
@@ -248,18 +248,10 @@ _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);
}