summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2008-08-19 03:40:27 -0700
committerCorbin Simpson <MostAwesomeDude@gmail.com>2008-08-19 03:40:27 -0700
commit7855ea2af23b20a2d6c3c0949e3f4695daca87cf (patch)
tree3b28bbcbfc779b281cd9d791531234122f75245f
parent12e84a8b84c331d0afef63e6119fe356c84bf383 (diff)
r5xx: Don't squish GL context when using FogOption
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index d71e4f6fe9..820b8dff30 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -747,8 +747,6 @@ static void r300Fogfv(GLcontext * ctx, GLenum pname, const GLfloat * param)
switch (pname) {
case GL_FOG_MODE:
- if (!ctx->Fog.Enabled)
- return;
switch (ctx->Fog.Mode) {
case GL_LINEAR:
R300_STATECHANGE(r300, fogs);
@@ -2623,10 +2621,10 @@ 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;
+ /* Enable HW fog. Try not to squish GL context.
+ * (Anybody sane remembered to set glFog() opts first!) */
ctx->Fog.Mode = fp->mesa_program.FogOption;
+ r300Fogfv(ctx, GL_FOG_MODE, NULL);
r300SetFogState(ctx, GL_TRUE);
}