summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorGustaw Smolarczyk <[email protected]>2017-03-30 20:09:31 +0200
committerMarek Olšák <[email protected]>2017-04-08 20:29:58 +0200
commitf7c9bf0c6bfa7eddafa5afc6c8e33e7f0a993db7 (patch)
tree65d236036a22e513e6774d3672d1c954a9df3c8f /src/mesa
parent837ad2dc384096d936fd65e30374129f36e09335 (diff)
mesa/main/ff_frag: Use compressed fog mode.
Signed-off-by: Gustaw Smolarczyk <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/ff_fragment_shader.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
index e1fe9b58c02..bdbefc7880b 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -117,21 +117,6 @@ struct state_key {
} unit[MAX_TEXTURE_COORD_UNITS];
};
-#define FOG_NONE 0
-#define FOG_LINEAR 1
-#define FOG_EXP 2
-#define FOG_EXP2 3
-
-static GLuint translate_fog_mode( GLenum mode )
-{
- switch (mode) {
- case GL_LINEAR: return FOG_LINEAR;
- case GL_EXP: return FOG_EXP;
- case GL_EXP2: return FOG_EXP2;
- default: return FOG_NONE;
- }
-}
-
#define OPR_SRC_COLOR 0
#define OPR_ONE_MINUS_SRC_COLOR 1
#define OPR_SRC_ALPHA 2
@@ -446,8 +431,7 @@ static GLuint make_state_key( struct gl_context *ctx, struct state_key *key )
}
/* _NEW_FOG */
- if (ctx->Fog.Enabled)
- key->fog_mode = translate_fog_mode(ctx->Fog.Mode);
+ key->fog_mode = ctx->Fog._PackedEnabledMode;
/* _NEW_BUFFERS */
key->num_draw_buffers = ctx->DrawBuffer->_NumColorDrawBuffers;