summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2008-08-19 09:24:27 -0700
committerCorbin Simpson <MostAwesomeDude@gmail.com>2008-08-19 09:24:27 -0700
commita667d67cd6c8b9aa622cd3fce065aca92e1e8a76 (patch)
tree31cf40106fd20d45c292efb1f7559ac4498ae3dd /src/mesa/drivers
parent7855ea2af23b20a2d6c3c0949e3f4695daca87cf (diff)
r5xx: Final fog option fix.
Is there some kind of git hook we could use to keep me from committing after like 10PM or so?
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 820b8dff30..15cd053161 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -2623,10 +2623,12 @@ static void r500SetupPixelShader(r300ContextPtr rmesa)
if (fp->mesa_program.FogOption != GL_NONE) {
/* Enable HW fog. Try not to squish GL context.
* (Anybody sane remembered to set glFog() opts first!) */
+ r300SetFogState(ctx, GL_TRUE);
ctx->Fog.Mode = fp->mesa_program.FogOption;
r300Fogfv(ctx, GL_FOG_MODE, NULL);
- r300SetFogState(ctx, GL_TRUE);
- }
+ } else
+ /* Make sure HW is matching GL context. */
+ r300SetFogState(ctx, ctx->Fog.Enabled);
r300SetupTextures(ctx);