Merge remote branch 'origin/mesa_7_6_branch'
[mesa.git] / src / mesa / tnl / t_vb_program.c
index dc954bcba148046f89f553360d30c411d677701c..c10a27614ff9e15249155211016ea9080e38b6c2 100644 (file)
@@ -131,13 +131,16 @@ do_ndc_cliptest(GLcontext *ctx, struct vp_stage_data *store)
    store->ormask = 0;
    store->andmask = CLIP_FRUSTUM_BITS;
 
+   tnl_clip_prepare(ctx);
+
    if (tnl->NeedNdcCoords) {
       VB->NdcPtr =
          _mesa_clip_tab[VB->ClipPtr->size]( VB->ClipPtr,
                                             &store->ndcCoords,
                                             store->clipmask,
                                             &store->ormask,
-                                            &store->andmask );
+                                            &store->andmask,
+                                           !ctx->Transform.DepthClamp );
    }
    else {
       VB->NdcPtr = NULL;
@@ -145,7 +148,8 @@ do_ndc_cliptest(GLcontext *ctx, struct vp_stage_data *store)
                                             NULL,
                                             store->clipmask,
                                             &store->ormask,
-                                            &store->andmask );
+                                            &store->andmask,
+                                           !ctx->Transform.DepthClamp );
    }
 
    if (store->andmask) {