summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/ff_fragment_shader.cpp9
-rw-r--r--src/mesa/main/mtypes.h1
2 files changed, 1 insertions, 9 deletions
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)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 5a25d649a13..160ae9d2622 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1923,7 +1923,6 @@ struct gl_geometry_program
struct gl_fragment_program
{
struct gl_program Base; /**< base class */
- GLenum FogOption;
GLboolean UsesKill; /**< shader uses KIL instruction */
GLboolean OriginUpperLeft;
GLboolean PixelCenterInteger;