diff options
Diffstat (limited to 'src/mesa/tnl/t_vb_vertex.c')
-rw-r--r-- | src/mesa/tnl/t_vb_vertex.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c index 0c163ee4f31..fc351033950 100644 --- a/src/mesa/tnl/t_vb_vertex.c +++ b/src/mesa/tnl/t_vb_vertex.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_vertex.c,v 1.2 2001/01/13 05:48:26 keithw Exp $ */ +/* $Id: t_vb_vertex.c,v 1.3 2001/01/29 20:47:39 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -160,13 +160,26 @@ static GLboolean run_vertex_stage( GLcontext *ctx, { /* Combined modelviewproject transform: */ - if (ctx->_ModelProjectMatrix.type == MATRIX_IDENTITY) + if (ctx->_ModelProjectMatrix.type == MATRIX_IDENTITY) VB->ClipPtr = VB->ObjPtr; else VB->ClipPtr = TransformRaw( &store->clip, &ctx->_ModelProjectMatrix, VB->ObjPtr ); } + /* Drivers expect this to be clean to element 4... + */ + if (VB->ClipPtr->size < 4) { + if (VB->ClipPtr->flags & VEC_NOT_WRITEABLE) { + ASSERT(VB->ClipPtr == VB->ObjPtr); + VB->import_data( ctx, VERT_OBJ, VEC_NOT_WRITEABLE ); + VB->ClipPtr = VB->ObjPtr; + } + if (VB->ClipPtr->size == 2) + gl_vector4f_clean_elem( VB->ClipPtr, VB->Count, 2 ); + gl_vector4f_clean_elem( VB->ClipPtr, VB->Count, 3 ); + } + /* Cliptest and perspective divide. Clip functions must clear * the clipmask. */ @@ -181,20 +194,6 @@ static GLboolean run_vertex_stage( GLcontext *ctx, &store->ormask, &store->andmask ); - /* Drivers expect this to be size 4... - */ - if (VB->ProjectedClipPtr->size < 4) { - ASSERT(VB->ProjectedClipPtr == VB->ClipPtr); - if (VB->ProjectedClipPtr->flags & VEC_NOT_WRITEABLE) { - ASSERT(VB->ProjectedClipPtr == VB->ObjPtr); - VB->import_data( ctx, VERT_OBJ, VEC_NOT_WRITEABLE ); - VB->ProjectedClipPtr = VB->ClipPtr = VB->ObjPtr; - } - if (VB->ClipPtr->size == 2) - gl_vector4f_clean_elem( VB->ClipPtr, VB->Count, 2 ); - gl_vector4f_clean_elem( VB->ClipPtr, VB->Count, 3 ); - VB->ClipPtr->size = 4; - } } else { VB->ProjectedClipPtr = 0; gl_clip_np_tab[VB->ClipPtr->size]( VB->ClipPtr, |