summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_vb_vertex.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2001-01-29 20:47:39 +0000
committerKeith Whitwell <[email protected]>2001-01-29 20:47:39 +0000
commit5c1e7fa6ee72f4403d9ec9d12830dd689b966e71 (patch)
tree8cb11c26af178632b05de9c5b2f53c32331475c5 /src/mesa/tnl/t_vb_vertex.c
parent4b90e68ac6d0fe4ffca5e2cd51794bb4350cac28 (diff)
Removed knowledge of swrast Clear/Bitmap/Accum/Draw/Read/CopyPixels
functions from core mesa -- if drivers need these fallbacks they must now call them themselves. Introduced hooks for clip-vertex-interpolation and the rendering of clipped lines and polygons. Allows drivers to interpolate their hardware-format vertices directly. Used in dri drivers to replace fastpath code. Slight optimizations to pipeline build/run routines.
Diffstat (limited to 'src/mesa/tnl/t_vb_vertex.c')
-rw-r--r--src/mesa/tnl/t_vb_vertex.c31
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,