glsl_to_tgsi: use swizzle_for_size for src reg in conditional moves
[mesa.git] / src / mesa / state_tracker / st_atom_clip.c
index 80c0e921398396f62ecc5ae11af4d958900a667b..1330db843a666b8e59046aab7faf765a503ba240 100644 (file)
 static void update_clip( struct st_context *st )
 {
    struct pipe_clip_state clip;
+   const struct gl_context *ctx = st->ctx;
    GLuint i;
 
    memset(&clip, 0, sizeof(clip));
 
    for (i = 0; i < PIPE_MAX_CLIP_PLANES; i++) {
-      if (st->ctx->Transform.ClipPlanesEnabled & (1 << i)) {
+      if (ctx->Transform.ClipPlanesEnabled & (1 << i)) {
         memcpy(clip.ucp[clip.nr], 
-               st->ctx->Transform._ClipUserPlane[i], 
+               ctx->Transform._ClipUserPlane[i], 
                sizeof(clip.ucp[0]));
         clip.nr++;
       }
    }
+
+   clip.depth_clamp = ctx->Transform.DepthClamp != GL_FALSE;
       
    if (memcmp(&clip, &st->state.clip, sizeof(clip)) != 0) {
       st->state.clip = clip;