From 7855ea2af23b20a2d6c3c0949e3f4695daca87cf Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Tue, 19 Aug 2008 03:40:27 -0700 Subject: r5xx: Don't squish GL context when using FogOption --- src/mesa/drivers/dri/r300/r300_state.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/mesa/drivers/dri/r300') diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index d71e4f6fe9c..820b8dff300 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); } -- cgit v1.2.3