From c304869ec02793f2d8bf363d1e3b37c3d121cca7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 21 Jul 2010 09:14:43 +0200 Subject: [PATCH] st/mesa: implement depth clamp --- src/mesa/state_tracker/st_atom_clip.c | 2 ++ src/mesa/state_tracker/st_extensions.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/mesa/state_tracker/st_atom_clip.c b/src/mesa/state_tracker/st_atom_clip.c index 80c0e921398..16f7aaae6f4 100644 --- a/src/mesa/state_tracker/st_atom_clip.c +++ b/src/mesa/state_tracker/st_atom_clip.c @@ -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; diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index d23ac0c2845..90e78679e47 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -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; + } } -- 2.30.2