From: Keith Whitwell Date: Wed, 9 May 2001 12:25:40 +0000 (+0000) Subject: Use correct PV when clipping. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e809379cafa1ce24572004cf9f496798b4d94903;p=mesa.git Use correct PV when clipping. --- diff --git a/src/mesa/tnl/t_vb_cliptmp.h b/src/mesa/tnl/t_vb_cliptmp.h index 5c64d964896..90b9b82f53a 100644 --- a/src/mesa/tnl/t_vb_cliptmp.h +++ b/src/mesa/tnl/t_vb_cliptmp.h @@ -1,4 +1,4 @@ -/* $Id: t_vb_cliptmp.h,v 1.11 2001/04/28 08:39:18 keithw Exp $ */ +/* $Id: t_vb_cliptmp.h,v 1.12 2001/05/09 12:25:40 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -161,21 +161,21 @@ static __inline void TAG(clip_line)( GLcontext *ctx, /* Clip a triangle against the viewport and user clip planes. */ static __inline void TAG(clip_tri)( GLcontext *ctx, - GLuint v0, GLuint v1, GLuint v2, - GLubyte mask ) + GLuint v0, GLuint v1, GLuint v2, + GLubyte mask ) { TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &tnl->vb; interp_func interp = tnl->Driver.RenderInterp; GLfloat (*coord)[4] = VB->ClipPtr->data; - GLuint pv = v0; + GLuint pv = v2; GLuint vlist[2][MAX_CLIPPED_VERTICES]; GLuint *inlist = vlist[0], *outlist = vlist[1]; GLuint p; GLubyte *clipmask = VB->ClipMask; GLuint n = 3; - ASSIGN_3V(inlist, v0, v1, v2 ); + ASSIGN_3V(inlist, v2, v0, v1 ); /* pv rotated to slot zero */ VB->LastClipped = VB->FirstClipped; @@ -221,14 +221,14 @@ static __inline void TAG(clip_quad)( GLcontext *ctx, struct vertex_buffer *VB = &tnl->vb; interp_func interp = tnl->Driver.RenderInterp; GLfloat (*coord)[4] = VB->ClipPtr->data; - GLuint pv = v0; + GLuint pv = v3; GLuint vlist[2][MAX_CLIPPED_VERTICES]; GLuint *inlist = vlist[0], *outlist = vlist[1]; GLuint p; GLubyte *clipmask = VB->ClipMask; GLuint n = 4; - ASSIGN_4V(inlist, v0, v1, v2, v3 ); + ASSIGN_4V(inlist, v3, v0, v1, v2 ); /* pv rotated to slot zero */ VB->LastClipped = VB->FirstClipped;