Merge remote branch 'origin/master' into gallium_draw_llvm
[mesa.git] / src / mesa / state_tracker / st_atom_clip.c
index 710d6ffc84f38556949d0b95e800717732099c49..80c0e921398396f62ecc5ae11af4d958900a667b 100644 (file)
  
 
 #include "st_context.h"
-#include "softpipe/sp_context.h"
+#include "pipe/p_context.h"
 #include "st_atom.h"
 
+#include "cso_cache/cso_context.h"
+
 
 /* Second state atom for user clip planes:
  */
 static void update_clip( struct st_context *st )
 {
-   struct softpipe_clip_state clip;
+   struct pipe_clip_state clip;
    GLuint i;
 
    memset(&clip, 0, sizeof(clip));
 
-   for (i = 0; i < SP_MAX_CLIP_PLANES; i++) {
+   for (i = 0; i < PIPE_MAX_CLIP_PLANES; i++) {
       if (st->ctx->Transform.ClipPlanesEnabled & (1 << i)) {
         memcpy(clip.ucp[clip.nr], 
                st->ctx->Transform._ClipUserPlane[i], 
@@ -56,20 +58,16 @@ static void update_clip( struct st_context *st )
       
    if (memcmp(&clip, &st->state.clip, sizeof(clip)) != 0) {
       st->state.clip = clip;
-      st->softpipe->set_clip_state(st->softpipe, &clip);
+      cso_set_clip(st->cso_context, &clip);
    }
 }
 
 
 const struct st_tracked_state st_update_clip = {
-   .dirty = {
-      .mesa = (_NEW_TRANSFORM),
-      .st  = 0,
+   "st_update_clip",                                   /* name */
+   {                                                   /* dirty */
+      (_NEW_TRANSFORM),                                        /* mesa */
+      0,                                               /* st */
    },
-   .update = update_clip
+   update_clip                                         /* update */
 };
-
-
-
-
-