summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index cce07d338b..d71e4f6fe9 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -2622,6 +2622,14 @@ static void r500SetupPixelShader(r300ContextPtr rmesa)
}
code = &fp->code;
+ if (fp->mesa_program.FogOption != GL_NONE) {
+ /* Enable HW fog.
+ * (Anybody sane remembered to set glFog() opts first! */
+ ctx->Fog.Enabled = GL_TRUE;
+ ctx->Fog.Mode = fp->mesa_program.FogOption;
+ r300SetFogState(ctx, GL_TRUE);
+ }
+
r300SetupTextures(ctx);
R300_STATECHANGE(rmesa, fp);