summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_vb_program.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2009-10-22 19:21:21 -0700
committerIan Romanick <[email protected]>2009-10-22 19:21:21 -0700
commit286611d99060c38c4cc12f18fde5448213e2a44b (patch)
treecefb190fd22a1f739ce1c254602541b9505f1e98 /src/mesa/tnl/t_vb_program.c
parentab9d1011f5549502a4b960c2067cde69856a2719 (diff)
Revert "Store clipping distance for user clip planes as part of vertex processing"
This reverts commit f058b25881e08c9d89a33345e5c84e1357396932. This change is completely wrong in so many ways. When clip distances are generated as part of vertex processing, they must be interpolated to perform clipping. Geometric clipping goes right out the window.
Diffstat (limited to 'src/mesa/tnl/t_vb_program.c')
-rw-r--r--src/mesa/tnl/t_vb_program.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c
index 5fb83c2b01b..c10a27614ff 100644
--- a/src/mesa/tnl/t_vb_program.c
+++ b/src/mesa/tnl/t_vb_program.c
@@ -66,7 +66,6 @@ struct vp_stage_data {
GLvector4f results[VERT_RESULT_MAX];
GLvector4f ndcCoords; /**< normalized device coords */
- GLfloat *clipdistance[MAX_CLIP_PLANES];
GLubyte *clipmask; /**< clip flags */
GLubyte ormask, andmask; /**< for clipping */
};
@@ -78,7 +77,6 @@ struct vp_stage_data {
static void
userclip( GLcontext *ctx,
GLvector4f *clip,
- GLfloat *clipdistance[MAX_CLIP_PLANES],
GLubyte *clipmask,
GLubyte *clipormask,
GLubyte *clipandmask )
@@ -107,8 +105,6 @@ userclip( GLcontext *ctx,
clipmask[i] |= CLIP_USER_BIT;
}
- clipdistance[p][i] = dp;
-
STRIDE_F(coord, stride);
}
@@ -168,7 +164,6 @@ do_ndc_cliptest(GLcontext *ctx, struct vp_stage_data *store)
ctx->VertexProgram.Current->IsPositionInvariant)) {
userclip( ctx,
VB->ClipPtr,
- store->clipdistance,
store->clipmask,
&store->ormask,
&store->andmask );
@@ -176,9 +171,6 @@ do_ndc_cliptest(GLcontext *ctx, struct vp_stage_data *store)
if (store->andmask) {
return GL_FALSE;
}
-
- memcpy(VB->ClipDistancePtr, store->clipdistance,
- sizeof(store->clipdistance));
}
VB->ClipAndMask = store->andmask;
@@ -522,10 +514,6 @@ init_vp(GLcontext *ctx, struct tnl_pipeline_stage *stage)
_mesa_vector4f_alloc( &store->ndcCoords, 0, size, 32 );
store->clipmask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte)*size, 32 );
- for (i = 0; i < MAX_CLIP_PLANES; i++)
- store->clipdistance[i] =
- (GLfloat *) ALIGN_MALLOC(sizeof(GLfloat) * size, 32);
-
return GL_TRUE;
}
@@ -549,9 +537,6 @@ dtr(struct tnl_pipeline_stage *stage)
_mesa_vector4f_free( &store->ndcCoords );
ALIGN_FREE( store->clipmask );
- for (i = 0; i < MAX_CLIP_PLANES; i++)
- ALIGN_FREE(store->clipdistance[i]);
-
FREE( store );
stage->privatePtr = NULL;
}