From 4d203a01e20dedcfaab09c18922e8ed9dcb39729 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 15 Apr 2011 19:04:57 -0700 Subject: mesa: Kill gl_fragment_program::FogOption with fire All drivers expect this to always be GL_NONE. Don't let there be any opportunity for a bad value to leak out and infect some unsuspecting driver. If any driver for hardware that had fixed-function per-fragment fog (i915 and perhaps some r300-ish) was ever going to add support, it would have done it by now. Reviewed-by: Eric Anholt Acked-by: Corbin Simpson Acked-by: Alex Deucher --- src/mesa/main/ff_fragment_shader.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/mesa/main/ff_fragment_shader.cpp') diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index b799b292664..0b53c28f7ae 100644 --- a/src/mesa/main/ff_fragment_shader.cpp +++ b/src/mesa/main/ff_fragment_shader.cpp @@ -1549,14 +1549,7 @@ create_new_program(struct gl_context *ctx, struct state_key *key, * the limits becuase it will potentially add some instructions. */ if (key->fog_enabled) { - /* Pull fog mode from struct gl_context, the value in the state key is - * a reduced value and not what is expected in FogOption - */ - p.program->FogOption = ctx->Fog.Mode; - p.program->Base.InputsRead |= FRAG_BIT_FOGC; - - _mesa_append_fog_code(ctx, p.program, GL_FALSE); - p.program->FogOption = GL_NONE; + _mesa_append_fog_code(ctx, p.program, ctx->Fog.Mode, GL_FALSE); } if (p.program->Base.NumTexIndirections > ctx->Const.FragmentProgram.MaxTexIndirections) -- cgit v1.2.3