aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl
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/tnl
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/tnl')
-rw-r--r--src/mesa/tnl/t_context.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c
index 5f5e2663b5f..a6da8cafe5a 100644
--- a/src/mesa/tnl/t_context.c
+++ b/src/mesa/tnl/t_context.c
@@ -138,16 +138,12 @@ _tnl_InvalidateState( struct gl_context *ctx, GLuint new_state )
}
}
- if (ctx->Fog.Enabled) {
- /* fixed-function fog */
+ if (ctx->Fog.Enabled
+ || (fp != NULL && (fp->Base.InputsRead & FRAG_BIT_FOGC) != 0)) {
+ /* Either fixed-function fog or a fragment program needs fog coord.
+ */
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_FOG );
}
- else if (fp) {
- if (fp->FogOption != GL_NONE || (fp->Base.InputsRead & FRAG_BIT_FOGC)) {
- /* fragment program needs fog coord */
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_FOG );
- }
- }
if (ctx->Polygon.FrontMode != GL_FILL ||
ctx->Polygon.BackMode != GL_FILL)