diff options
author | Eric Anholt <anholt@FreeBSD.org> | 2005-10-26 09:37:53 +0000 |
---|---|---|
committer | Eric Anholt <anholt@FreeBSD.org> | 2005-10-26 09:37:53 +0000 |
commit | 2330ed08c3d5f5fe3c02634d54e606501dff4862 (patch) | |
tree | 850754719df8e60bbbda834a7d0ae3f585de22dc /src/mesa/drivers/dri/sis/sis_fog.c | |
parent | a09d002bb5b9610681e10e3e3b09e5da5b971eaa (diff) |
Add disabled support for GL_EXT_fog_coord. While it seems correct to me, it's
not respecting the coords (or perhaps interpreting them differently?) in my
testing. However, in the process it led to a fix of a secondary color handling
issue where it would be taken from the wrong offset, I believe, based off of
reading the r200 driver. Also add a minor tweak to save time in the
fog-but-not-specular case.
Diffstat (limited to 'src/mesa/drivers/dri/sis/sis_fog.c')
-rw-r--r-- | src/mesa/drivers/dri/sis/sis_fog.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/sis/sis_fog.c b/src/mesa/drivers/dri/sis/sis_fog.c index da36b3d795..fe9a3c95d6 100644 --- a/src/mesa/drivers/dri/sis/sis_fog.c +++ b/src/mesa/drivers/dri/sis/sis_fog.c @@ -53,6 +53,22 @@ sisDDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *params ) switch (pname) { + case GL_FOG_COORDINATE_SOURCE_EXT: + current->hwFog &= ~MASK_FogMode; + switch (ctx->Fog.FogCoordinateSource) + { + case GL_FOG_COORDINATE_EXT: + current->hwFog &= ~MASK_FogZLookup; + break; + case GL_FRAGMENT_DEPTH_EXT: + current->hwFog |= MASK_FogZLookup; + break; + } + if (current->hwFog != prev->hwFog) { + prev->hwFog = current->hwFog; + smesa->GlobalFlag |= GFLAG_FOGSETTING; + } + break; case GL_FOG_MODE: current->hwFog &= ~MASK_FogMode; switch (ctx->Fog.Mode) |