- if (stage->changed_inputs) {
-
- if (ctx->_NeedEyeCoords) {
- /* Separate modelview and project transformations:
- */
- if (ctx->ModelView.type == MATRIX_IDENTITY)
- VB->EyePtr = VB->ObjPtr;
- else
- VB->EyePtr = TransformRaw( &store->eye, &ctx->ModelView,
- VB->ObjPtr);
-
- if (ctx->ProjectionMatrix.type == MATRIX_IDENTITY)
- VB->ClipPtr = VB->EyePtr;
- else
- VB->ClipPtr = TransformRaw( &store->clip, &ctx->ProjectionMatrix,
- VB->EyePtr );
- }
- else {
- /* Combined modelviewproject transform:
- */
- 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)
- _mesa_vector4f_clean_elem( VB->ClipPtr, VB->Count, 2 );
- _mesa_vector4f_clean_elem( VB->ClipPtr, VB->Count, 3 );
- }
-
- /* Cliptest and perspective divide. Clip functions must clear
- * the clipmask.