summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 681de914e8..e0c3286195 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -361,7 +361,10 @@ static void radeonFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
switch (ctx->Fog.Mode) {
case GL_EXP:
c.f = 0.0;
- d.f = ctx->Fog.Density;
+ /* While this is the opposite sign from the DDK, it makes the fog test
+ * pass, and matches r200.
+ */
+ d.f = -ctx->Fog.Density;
break;
case GL_EXP2:
c.f = 0.0;
@@ -373,7 +376,10 @@ static void radeonFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
d.f = 1.0F;
} else {
c.f = ctx->Fog.End/(ctx->Fog.End-ctx->Fog.Start);
- d.f = 1.0/(ctx->Fog.End-ctx->Fog.Start);
+ /* While this is the opposite sign from the DDK, it makes the fog
+ * test pass, and matches r200.
+ */
+ d.f = -1.0/(ctx->Fog.End-ctx->Fog.Start);
}
break;
default: