st/mesa: fix clip state dependencies
authorMarek Olšák <marek.olsak@amd.com>
Sat, 17 Oct 2015 12:20:01 +0000 (14:20 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 17 Oct 2015 17:36:44 +0000 (19:36 +0200)
This allows removing FLUSH_VERTICES in MatrixMode.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_atom_clip.c

index 506a770499f49cc2d8e3621c4549cb8cec00f8d5..b820d843385051069793afe88aad4ed6b87a0009 100644 (file)
@@ -56,6 +56,9 @@ static void update_clip( struct st_context *st )
          use_eye = TRUE;
    }
 
+   /* _ClipUserPlane = _NEW_TRANSFORM | _NEW_PROJECTION
+    * EyeUserPlane = _NEW_TRANSFORM
+    */
    memcpy(clip.ucp,
           use_eye ? ctx->Transform.EyeUserPlane
                   : ctx->Transform._ClipUserPlane, sizeof(clip.ucp));
@@ -70,7 +73,7 @@ static void update_clip( struct st_context *st )
 const struct st_tracked_state st_update_clip = {
    "st_update_clip",                                   /* name */
    {                                                   /* dirty */
-      _NEW_TRANSFORM,                                   /* mesa */
+      _NEW_TRANSFORM | _NEW_PROJECTION,                 /* mesa */
       ST_NEW_VERTEX_PROGRAM,                           /* st */
    },
    update_clip                                         /* update */