diff options
author | Eric Anholt <[email protected]> | 2009-08-26 09:51:15 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2009-09-08 14:30:15 -0700 |
commit | b4922b533155cc139ebafb111502bb55d2ad2ccf (patch) | |
tree | a784133f9de7e5fccda5305ab926bebc5ffbaf19 /src/mesa/main/attrib.c | |
parent | 3e4539a471da48066a83eda8e14301dbc4dbf6db (diff) |
mesa: Add support for ARB_depth_clamp.
This currently doesn't include fixing up the cliptests in the assembly
paths to support ARB_depth_clamp, so enabling depth_clamp forces the C path.
Diffstat (limited to 'src/mesa/main/attrib.c')
-rw-r--r-- | src/mesa/main/attrib.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index ab99ca1c642..0fb8fa3bba2 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -74,6 +74,7 @@ struct gl_enable_attrib GLboolean Convolution2D; GLboolean Separable2D; GLboolean CullFace; + GLboolean DepthClamp; GLboolean DepthTest; GLboolean Dither; GLboolean Fog; @@ -265,6 +266,7 @@ _mesa_PushAttrib(GLbitfield mask) attr->Convolution2D = ctx->Pixel.Convolution2DEnabled; attr->Separable2D = ctx->Pixel.Separable2DEnabled; attr->CullFace = ctx->Polygon.CullFlag; + attr->DepthClamp = ctx->Transform.DepthClamp; attr->DepthTest = ctx->Depth.Test; attr->Dither = ctx->Color.DitherFlag; attr->Fog = ctx->Fog.Enabled; @@ -514,6 +516,8 @@ pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable) enable->ColorTable[COLORTABLE_POSTCOLORMATRIX], GL_POST_COLOR_MATRIX_COLOR_TABLE); TEST_AND_UPDATE(ctx->Polygon.CullFlag, enable->CullFace, GL_CULL_FACE); + TEST_AND_UPDATE(ctx->Transform.DepthClamp, enable->DepthClamp, + GL_DEPTH_CLAMP); TEST_AND_UPDATE(ctx->Depth.Test, enable->DepthTest, GL_DEPTH_TEST); TEST_AND_UPDATE(ctx->Color.DitherFlag, enable->Dither, GL_DITHER); TEST_AND_UPDATE(ctx->Pixel.Convolution1DEnabled, enable->Convolution1D, @@ -1221,6 +1225,9 @@ _mesa_PopAttrib(void) if (xform->RescaleNormals != ctx->Transform.RescaleNormals) _mesa_set_enable(ctx, GL_RESCALE_NORMAL_EXT, ctx->Transform.RescaleNormals); + if (xform->DepthClamp != ctx->Transform.DepthClamp) + _mesa_set_enable(ctx, GL_DEPTH_CLAMP, + ctx->Transform.DepthClamp); } break; case GL_TEXTURE_BIT: |