st/mesa: implement depth clamp
authorMarek Olšák <maraeo@gmail.com>
Wed, 21 Jul 2010 07:14:43 +0000 (09:14 +0200)
committerMarek Olšák <maraeo@gmail.com>
Wed, 21 Jul 2010 20:54:34 +0000 (22:54 +0200)
src/mesa/state_tracker/st_atom_clip.c
src/mesa/state_tracker/st_extensions.c

index 80c0e921398396f62ecc5ae11af4d958900a667b..16f7aaae6f41bf0cd704d2c0fa8225d21a5a2b03 100644 (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;
index d23ac0c28451cbfc5faabe41c3ad2e03f29cb8a9..90e78679e472c20101d6df14014cceab1f46db77 100644 (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;
+   }
 }