diff options
author | Eric Anholt <[email protected]> | 2005-10-27 19:59:41 +0000 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2005-10-27 19:59:41 +0000 |
commit | 512c994b92126a7575bb3cc327da40710b43f52c (patch) | |
tree | 4c8b9233a3691ef994a1aa9f03789d00992d125b /src/mesa | |
parent | 170a61ec00b9eb1980511b793051e238e47ca2a1 (diff) |
Bug #4900: Fix the non-fogcoord fog test on r100 (and rv200) at tcl_mode=1 by
flipping the signs on two factors. While this contradicts the DDK, it matches
what r200 does, and it fixes the test.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_state.c | 10 |
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 681de914e83..e0c3286195d 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: |