st/mesa: implement depth clamp

This commit is contained in:
Marek Olšák 2010-07-21 09:14:43 +02:00
parent 4460e9f0a1
commit c304869ec0
2 changed files with 6 additions and 0 deletions

View file

@ -55,6 +55,8 @@ static void update_clip( struct st_context *st )
clip.nr++;
}
}
clip.depth_clamp = st->ctx->Transform.DepthClamp != GL_FALSE;
if (memcmp(&clip, &st->state.clip, sizeof(clip)) != 0) {
st->state.clip = clip;

View file

@ -397,4 +397,8 @@ void st_init_extensions(struct st_context *st)
if (screen->get_param(screen, PIPE_CAP_GEOMETRY_SHADER4)) {
ctx->Extensions.ARB_geometry_shader4 = GL_TRUE;
}
if (screen->get_param(screen, PIPE_CAP_DEPTH_CLAMP)) {
ctx->Extensions.ARB_depth_clamp = GL_TRUE;
}
}