summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2008-08-18 16:38:21 -0700
committerCorbin Simpson <[email protected]>2008-08-18 16:38:21 -0700
commit12e84a8b84c331d0afef63e6119fe356c84bf383 (patch)
tree93334013bef2eb00390eb39f0c161c9b61abc543 /src/mesa
parente438827dec5a3aafa04e13caf5988f359c004249 (diff)
r5xx: Enable fog options.
This uses fog HW instead of fragment programs. If it breaks you, let me know!
Diffstat (limited to 'src/mesa')
-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 cce07d338bb..d71e4f6fe9c 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);