diff options
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r-- | src/mesa/main/enable.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 4bc54771e97..4c1f46102d1 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -36,7 +36,6 @@ #include "simple_list.h" #include "mtypes.h" #include "enums.h" -#include "math/m_matrix.h" #include "api_arrayelt.h" @@ -947,6 +946,14 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state) ctx->Depth.BoundsTest = state; break; + case GL_DEPTH_CLAMP: + if (ctx->Transform.DepthClamp == state) + return; + CHECK_EXTENSION(ARB_depth_clamp, cap); + FLUSH_VERTICES(ctx, _NEW_TRANSFORM); + ctx->Transform.DepthClamp = state; + break; + #if FEATURE_ATI_fragment_shader case GL_FRAGMENT_SHADER_ATI: CHECK_EXTENSION(ATI_fragment_shader, cap); @@ -1395,6 +1402,11 @@ _mesa_IsEnabled( GLenum cap ) CHECK_EXTENSION(EXT_depth_bounds_test); return ctx->Depth.BoundsTest; + /* GL_ARB_depth_clamp */ + case GL_DEPTH_CLAMP: + CHECK_EXTENSION(ARB_depth_clamp); + return ctx->Transform.DepthClamp; + #if FEATURE_ATI_fragment_shader case GL_FRAGMENT_SHADER_ATI: CHECK_EXTENSION(ATI_fragment_shader); |