- /* Update derived state. This state also depends on the projection
- * matrix, and is recalculated on changes to the projection matrix by
- * code in _mesa_update_state().
- */
- if (ctx->Transform.ClipEnabled[p]) {
- if (ctx->ProjectionMatrix.flags & MAT_DIRTY)
- _math_matrix_analyse( &ctx->ProjectionMatrix );
-
- _mesa_transform_vector( ctx->Transform._ClipUserPlane[p],
- ctx->Transform.EyeUserPlane[p],
- ctx->ProjectionMatrix.inv );
+ if (ctx->Transform.ClipPlanesEnabled & (1 << p)) {
+ _mesa_update_clip_plane(ctx, p);