diff options
Diffstat (limited to 'src/mesa/swrast_setup')
-rw-r--r-- | src/mesa/swrast_setup/ss_context.c | 59 | ||||
-rw-r--r-- | src/mesa/swrast_setup/ss_context.h | 8 | ||||
-rw-r--r-- | src/mesa/swrast_setup/ss_triangle.c | 45 | ||||
-rw-r--r-- | src/mesa/swrast_setup/ss_triangle.h | 4 | ||||
-rw-r--r-- | src/mesa/swrast_setup/ss_tritmp.h | 35 | ||||
-rw-r--r-- | src/mesa/swrast_setup/ss_vb.c | 23 | ||||
-rw-r--r-- | src/mesa/swrast_setup/ss_vb.h | 4 | ||||
-rw-r--r-- | src/mesa/swrast_setup/ss_vbtmp.h | 36 | ||||
-rw-r--r-- | src/mesa/swrast_setup/swrast_setup.h | 44 |
9 files changed, 134 insertions, 124 deletions
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c index 6eaeb9c5273..def9e4f43c8 100644 --- a/src/mesa/swrast_setup/ss_context.c +++ b/src/mesa/swrast_setup/ss_context.c @@ -1,21 +1,21 @@ -/* $Id: ss_context.c,v 1.12 2001/03/07 05:06:13 brianp Exp $ */ +/* $Id: ss_context.c,v 1.13 2001/03/12 00:48:43 gareth Exp $ */ /* * Mesa 3-D graphics library * Version: 3.5 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * + * + * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -36,7 +36,7 @@ #include "swrast_setup.h" #include "tnl/t_context.h" - + #define _SWSETUP_NEW_VERTS (_NEW_RENDERMODE| \ _NEW_LIGHT| \ _NEW_TEXTURE| \ @@ -48,40 +48,40 @@ /* Dispatch from these fixed entrypoints to the state-dependent - * functions. + * functions. * * The design of swsetup suggests that we could really program * ctx->Driver.TriangleFunc directly from _swsetup_RenderStart, and * avoid this second level of indirection. However, this is more - * convient for fallback cases in hardware rasterization drivers. + * convient for fallback cases in hardware rasterization drivers. */ -void -_swsetup_Quad( GLcontext *ctx, GLuint v0, GLuint v1, +void +_swsetup_Quad( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) { SWSETUP_CONTEXT(ctx)->Quad( ctx, v0, v1, v2, v3 ); } -void -_swsetup_Triangle( GLcontext *ctx, GLuint v0, GLuint v1, +void +_swsetup_Triangle( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2 ) { SWSETUP_CONTEXT(ctx)->Triangle( ctx, v0, v1, v2 ); } -void +void _swsetup_Line( GLcontext *ctx, GLuint v0, GLuint v1 ) { SWSETUP_CONTEXT(ctx)->Line( ctx, v0, v1 ); } -void +void _swsetup_Points( GLcontext *ctx, GLuint first, GLuint last ) { SWSETUP_CONTEXT(ctx)->Points( ctx, first, last ); } -void +void _swsetup_BuildProjectedVertices( GLcontext *ctx, GLuint start, GLuint end, GLuint new_inputs ) { @@ -94,8 +94,8 @@ _swsetup_CreateContext( GLcontext *ctx ) { TNLcontext *tnl = TNL_CONTEXT(ctx); SScontext *swsetup = (SScontext *)CALLOC(sizeof(SScontext)); - - if (!swsetup) + + if (!swsetup) return GL_FALSE; swsetup->verts = (SWvertex *) ALIGN_MALLOC( sizeof(SWvertex) * tnl->vb.Size, 32); @@ -118,7 +118,7 @@ void _swsetup_DestroyContext( GLcontext *ctx ) { if (SWSETUP_CONTEXT(ctx)) { - if (SWSETUP_CONTEXT(ctx)->verts) + if (SWSETUP_CONTEXT(ctx)->verts) ALIGN_FREE(SWSETUP_CONTEXT(ctx)->verts); FREE(SWSETUP_CONTEXT(ctx)); @@ -134,8 +134,8 @@ _swsetup_RenderPrimitive( GLcontext *ctx, GLenum mode ) void _swsetup_RenderStart( GLcontext *ctx ) -{ - SScontext *swsetup = SWSETUP_CONTEXT(ctx); +{ + SScontext *swsetup = SWSETUP_CONTEXT(ctx); struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; GLuint new_state = swsetup->NewState; @@ -149,10 +149,10 @@ _swsetup_RenderStart( GLcontext *ctx ) swsetup->NewState = 0; - if (VB->ClipMask && VB->importable_data) + if (VB->ClipMask && VB->importable_data) VB->import_data( ctx, VB->importable_data, - VEC_NOT_WRITEABLE|VEC_BAD_STRIDE); + VEC_NOT_WRITEABLE|VEC_BAD_STRIDE); } void @@ -164,7 +164,7 @@ _swsetup_RenderFinish( GLcontext *ctx ) void _swsetup_InvalidateState( GLcontext *ctx, GLuint new_state ) { - SScontext *swsetup = SWSETUP_CONTEXT(ctx); + SScontext *swsetup = SWSETUP_CONTEXT(ctx); swsetup->NewState |= new_state; if (new_state & _SWSETUP_NEW_INTERP) { @@ -173,17 +173,16 @@ _swsetup_InvalidateState( GLcontext *ctx, GLuint new_state ) } } -void -_swsetup_RenderInterp( GLcontext *ctx, GLfloat t, +void +_swsetup_RenderInterp( GLcontext *ctx, GLfloat t, GLuint dst, GLuint out, GLuint in, - GLboolean force_boundary ) + GLboolean force_boundary ) { SWSETUP_CONTEXT(ctx)->RenderInterp( ctx, t, dst, out, in, force_boundary ); } -void -_swsetup_RenderCopyPV( GLcontext *ctx, GLuint dst, GLuint src ) +void +_swsetup_RenderCopyPV( GLcontext *ctx, GLuint dst, GLuint src ) { SWSETUP_CONTEXT(ctx)->RenderCopyPV( ctx, dst, src ); } - diff --git a/src/mesa/swrast_setup/ss_context.h b/src/mesa/swrast_setup/ss_context.h index d19b1c62e01..895fb1b03ed 100644 --- a/src/mesa/swrast_setup/ss_context.h +++ b/src/mesa/swrast_setup/ss_context.h @@ -1,8 +1,10 @@ +/* $Id: ss_context.h,v 1.7 2001/03/12 00:48:43 gareth Exp $ */ + /* * Mesa 3-D graphics library * Version: 3.5 * - * Copyright (C) 1999 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -40,7 +42,7 @@ typedef struct { */ void (*InvalidateState)( GLcontext *ctx, GLuint new_state ); - void (*BuildProjVerts)( GLcontext *ctx, + void (*BuildProjVerts)( GLcontext *ctx, GLuint start, GLuint end, GLuint new_inputs ); void (*Quad)( GLcontext *ctx, GLuint v0, GLuint v1, @@ -55,7 +57,7 @@ typedef struct { void (*RenderCopyPV)( GLcontext *ctx, GLuint dst, GLuint src ); - void (*RenderInterp)( GLcontext *ctx, GLfloat t, + void (*RenderInterp)( GLcontext *ctx, GLfloat t, GLuint dst, GLuint out, GLuint in, GLboolean force_boundary ); diff --git a/src/mesa/swrast_setup/ss_triangle.c b/src/mesa/swrast_setup/ss_triangle.c index ad44b1453fd..958eae3a29a 100644 --- a/src/mesa/swrast_setup/ss_triangle.c +++ b/src/mesa/swrast_setup/ss_triangle.c @@ -1,8 +1,10 @@ +/* $Id: ss_triangle.c,v 1.12 2001/03/12 00:48:43 gareth Exp $ */ + /* * Mesa 3-D graphics library * Version: 3.5 * - * Copyright (C) 1999 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -35,20 +37,20 @@ #include "ss_triangle.h" #include "ss_context.h" -#define SS_RGBA_BIT 0x1 -#define SS_OFFSET_BIT 0x2 -#define SS_TWOSIDE_BIT 0x4 -#define SS_UNFILLED_BIT 0x8 +#define SS_RGBA_BIT 0x1 +#define SS_OFFSET_BIT 0x2 +#define SS_TWOSIDE_BIT 0x4 +#define SS_UNFILLED_BIT 0x8 #define SS_MAX_TRIFUNC 0x10 static triangle_func tri_tab[SS_MAX_TRIFUNC]; static quad_func quad_tab[SS_MAX_TRIFUNC]; -static void _swsetup_render_line_tri( GLcontext *ctx, +static void _swsetup_render_line_tri( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) { - SScontext *swsetup = SWSETUP_CONTEXT(ctx); + SScontext *swsetup = SWSETUP_CONTEXT(ctx); struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; GLubyte *ef = VB->EdgeFlag; SWvertex *verts = swsetup->verts; @@ -76,13 +78,13 @@ static void _swsetup_render_line_tri( GLcontext *ctx, } if (swsetup->render_prim == GL_POLYGON) { - if (ef[e2]) _swrast_Line( ctx, v2, v0 ); - if (ef[e0]) _swrast_Line( ctx, v0, v1 ); - if (ef[e1]) _swrast_Line( ctx, v1, v2 ); + if (ef[e2]) _swrast_Line( ctx, v2, v0 ); + if (ef[e0]) _swrast_Line( ctx, v0, v1 ); + if (ef[e1]) _swrast_Line( ctx, v1, v2 ); } else { - if (ef[e0]) _swrast_Line( ctx, v0, v1 ); - if (ef[e1]) _swrast_Line( ctx, v1, v2 ); - if (ef[e2]) _swrast_Line( ctx, v2, v0 ); + if (ef[e0]) _swrast_Line( ctx, v0, v1 ); + if (ef[e1]) _swrast_Line( ctx, v1, v2 ); + if (ef[e2]) _swrast_Line( ctx, v2, v0 ); } if (ctx->_TriangleCaps & DD_FLATSHADE) { @@ -95,10 +97,10 @@ static void _swsetup_render_line_tri( GLcontext *ctx, } } -static void _swsetup_render_point_tri( GLcontext *ctx, +static void _swsetup_render_point_tri( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) { - SScontext *swsetup = SWSETUP_CONTEXT(ctx); + SScontext *swsetup = SWSETUP_CONTEXT(ctx); struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; GLubyte *ef = VB->EdgeFlag; SWvertex *verts = swsetup->verts; @@ -125,9 +127,9 @@ static void _swsetup_render_point_tri( GLcontext *ctx, v1->index = v2->index; } - if (ef[e0]) _swrast_Point( ctx, v0 ); - if (ef[e1]) _swrast_Point( ctx, v1 ); - if (ef[e2]) _swrast_Point( ctx, v2 ); + if (ef[e0]) _swrast_Point( ctx, v0 ); + if (ef[e1]) _swrast_Point( ctx, v1 ); + if (ef[e2]) _swrast_Point( ctx, v2 ); if (ctx->_TriangleCaps & DD_FLATSHADE) { COPY_CHAN4(v0->color, c[0]); @@ -237,14 +239,14 @@ static void swsetup_points( GLcontext *ctx, GLuint first, GLuint last ) struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; SWvertex *verts = SWSETUP_CONTEXT(ctx)->verts; GLuint i; - + if (VB->Elts) { - for (i = first; i < last; i++) + for (i = first; i < last; i++) if (VB->ClipMask[VB->Elts[i]] == 0) _swrast_Point( ctx, &verts[VB->Elts[i]] ); } else { - for (i = first; i < last; i++) + for (i = first; i < last; i++) if (VB->ClipMask[i] == 0) _swrast_Point( ctx, &verts[i] ); } @@ -280,4 +282,3 @@ void _swsetup_choose_trifuncs( GLcontext *ctx ) swsetup->Line = swsetup_line; swsetup->Points = swsetup_points; } - diff --git a/src/mesa/swrast_setup/ss_triangle.h b/src/mesa/swrast_setup/ss_triangle.h index 5b21a65ed08..a486826d4ed 100644 --- a/src/mesa/swrast_setup/ss_triangle.h +++ b/src/mesa/swrast_setup/ss_triangle.h @@ -1,8 +1,10 @@ +/* $Id: ss_triangle.h,v 1.3 2001/03/12 00:48:43 gareth Exp $ */ + /* * Mesa 3-D graphics library * Version: 3.5 * - * Copyright (C) 1999 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h index 92f85dab915..31ad68d1bf3 100644 --- a/src/mesa/swrast_setup/ss_tritmp.h +++ b/src/mesa/swrast_setup/ss_tritmp.h @@ -1,19 +1,21 @@ +/* $Id: ss_tritmp.h,v 1.9 2001/03/12 00:48:43 gareth Exp $ */ + /* * Mesa 3-D graphics library * Version: 3.5 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * + * + * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -52,10 +54,10 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) if (IND & (SS_TWOSIDE_BIT | SS_UNFILLED_BIT)) { facing = (cc < 0.0) ^ ctx->Polygon._FrontBit; - + if (IND & SS_UNFILLED_BIT) mode = facing ? ctx->Polygon.BackMode : ctx->Polygon.FrontMode; - + if (facing == 1) { if (IND & SS_TWOSIDE_BIT) { if (IND & SS_RGBA_BIT) { @@ -74,7 +76,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) SS_IND(v[2]->index, vbindex[e2]); } } - } + } } if (IND & SS_OFFSET_BIT) @@ -120,7 +122,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) v[1]->win[2] += offset; v[2]->win[2] += offset; } - _swrast_Triangle( ctx, v[0], v[1], v[2] ); + _swrast_Triangle( ctx, v[0], v[1], v[2] ); } if (IND & SS_OFFSET_BIT) { @@ -129,7 +131,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) v[2]->win[2] = z[2]; } - if (IND & SS_TWOSIDE_BIT) { + if (IND & SS_TWOSIDE_BIT) { if (facing == 1) { if (IND & SS_RGBA_BIT) { GLchan (*vbcolor)[4] = VB->ColorPtr[0]->data; @@ -147,7 +149,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) SS_IND(v[2]->index, vbindex[e2]); } } - } + } } @@ -161,12 +163,12 @@ static void TAG(quad)( GLcontext *ctx, GLuint v0, struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; GLubyte ef1 = VB->EdgeFlag[v1]; GLubyte ef3 = VB->EdgeFlag[v3]; - VB->EdgeFlag[v1] = 0; + VB->EdgeFlag[v1] = 0; TAG(triangle)( ctx, v0, v1, v3 ); VB->EdgeFlag[v1] = ef1; - VB->EdgeFlag[v3] = 0; - TAG(triangle)( ctx, v1, v2, v3 ); - VB->EdgeFlag[v3] = ef3; + VB->EdgeFlag[v3] = 0; + TAG(triangle)( ctx, v1, v2, v3 ); + VB->EdgeFlag[v3] = ef3; } else { TAG(triangle)( ctx, v0, v1, v3 ); TAG(triangle)( ctx, v1, v2, v3 ); @@ -185,6 +187,3 @@ static void TAG(init)( void ) #undef IND #undef TAG - - - diff --git a/src/mesa/swrast_setup/ss_vb.c b/src/mesa/swrast_setup/ss_vb.c index d69f0ed8fcd..eb3e0ec3fc6 100644 --- a/src/mesa/swrast_setup/ss_vb.c +++ b/src/mesa/swrast_setup/ss_vb.c @@ -1,19 +1,21 @@ +/* $Id: ss_vb.c,v 1.11 2001/03/12 00:48:43 gareth Exp $ */ + /* * Mesa 3-D graphics library * Version: 3.5 - * + * * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -199,7 +201,7 @@ rs_invalid( GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs ) (void) (ctx && start && end && newinputs); } -void +void _swsetup_vb_init( GLcontext *ctx ) { GLuint i; @@ -258,7 +260,7 @@ static void printSetupFlags(char *msg, GLuint flags ) } -void +void _swsetup_choose_rastersetup_func(GLcontext *ctx) { SScontext *swsetup = SWSETUP_CONTEXT(ctx); @@ -268,9 +270,9 @@ _swsetup_choose_rastersetup_func(GLcontext *ctx) if (ctx->Visual.rgbMode) { funcindex = COLOR; - if (ctx->Texture._ReallyEnabled & ~0xf) + if (ctx->Texture._ReallyEnabled & ~0xf) funcindex |= MULTITEX; - else if (ctx->Texture._ReallyEnabled & 0xf) + else if (ctx->Texture._ReallyEnabled & 0xf) funcindex |= TEX0; if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR || @@ -288,11 +290,11 @@ _swsetup_choose_rastersetup_func(GLcontext *ctx) funcindex |= FOG; } else if (ctx->RenderMode == GL_FEEDBACK) { - if (ctx->Visual.rgbMode) + if (ctx->Visual.rgbMode) funcindex = (COLOR | TEX0); /* is feedback color subject to fogging? */ else funcindex = (INDEX | TEX0); - } + } else funcindex = 0; @@ -300,4 +302,3 @@ _swsetup_choose_rastersetup_func(GLcontext *ctx) swsetup->BuildProjVerts = setup_func[funcindex]; ASSERT(setup_func[funcindex] != rs_invalid); } - diff --git a/src/mesa/swrast_setup/ss_vb.h b/src/mesa/swrast_setup/ss_vb.h index 6e8685a0b22..a7d05bf71a2 100644 --- a/src/mesa/swrast_setup/ss_vb.h +++ b/src/mesa/swrast_setup/ss_vb.h @@ -1,8 +1,10 @@ +/* $Id: ss_vb.h,v 1.3 2001/03/12 00:48:43 gareth Exp $ */ + /* * Mesa 3-D graphics library * Version: 3.5 * - * Copyright (C) 1999 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/src/mesa/swrast_setup/ss_vbtmp.h b/src/mesa/swrast_setup/ss_vbtmp.h index 8b6aaaecded..fcfc1c93d70 100644 --- a/src/mesa/swrast_setup/ss_vbtmp.h +++ b/src/mesa/swrast_setup/ss_vbtmp.h @@ -1,19 +1,21 @@ +/* $Id: ss_vbtmp.h,v 1.12 2001/03/12 00:48:43 gareth Exp $ */ + /* * Mesa 3-D graphics library * Version: 3.5 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * + * + * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -61,12 +63,12 @@ static void TAG(rs)(GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs ) (VB->ClipOrMask ? VEC_NOT_WRITEABLE|VEC_BAD_STRIDE : VEC_BAD_STRIDE)); - + if (IND & TEX0) { tc[0] = VB->TexCoordPtr[0]->data; tsz[0] = VB->TexCoordPtr[0]->size; } - + if (IND & MULTITEX) { for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) { if (VB->TexCoordPtr[i]) { @@ -84,12 +86,12 @@ static void TAG(rs)(GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs ) VB->SecondaryColorPtr[0] = VB->ColorPtr[0]; VB->SecondaryColorPtr[1] = VB->ColorPtr[1]; } - + proj = VB->ProjectedClipPtr->data; if (IND & FOG) - fog = VB->FogCoordPtr->data; - if (IND & COLOR) + fog = VB->FogCoordPtr->data; + if (IND & COLOR) color = VB->ColorPtr[0]->data; if (IND & SPEC) spec = VB->SecondaryColorPtr[0]->data; @@ -106,28 +108,28 @@ static void TAG(rs)(GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs ) v->win[1] = sy * proj[i][1] + ty; v->win[2] = sz * proj[i][2] + tz; v->win[3] = proj[i][3]; - - if (IND & TEX0) + + if (IND & TEX0) COPY_CLEAN_4V( v->texcoord[0], tsz[0], tc[0][i] ); if (IND & MULTITEX) { GLuint u; for (u = 0 ; u < maxtex ; u++) - if (tc[u]) + if (tc[u]) COPY_CLEAN_4V( v->texcoord[u], tsz[u], tc[u][i] ); } if (IND & COLOR) COPY_CHAN4(v->color, color[i]); - - if (IND & SPEC) + + if (IND & SPEC) COPY_CHAN4(v->specular, spec[i]); if (IND & FOG) - v->fog = fog[i]; + v->fog = fog[i]; if (IND & INDEX) - v->index = index[i]; + v->index = index[i]; if (IND & POINT) v->pointSize = pointSize[i]; diff --git a/src/mesa/swrast_setup/swrast_setup.h b/src/mesa/swrast_setup/swrast_setup.h index f3f8941a40f..bec8d90c1f3 100644 --- a/src/mesa/swrast_setup/swrast_setup.h +++ b/src/mesa/swrast_setup/swrast_setup.h @@ -1,19 +1,21 @@ +/* $Id: swrast_setup.h,v 1.8 2001/03/12 00:48:43 gareth Exp $ */ + /* * Mesa 3-D graphics library * Version: 3.5 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * + * + * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -33,31 +35,31 @@ #ifndef SWRAST_SETUP_H #define SWRAST_SETUP_H -extern GLboolean +extern GLboolean _swsetup_CreateContext( GLcontext *ctx ); -extern void +extern void _swsetup_DestroyContext( GLcontext *ctx ); -extern void +extern void _swsetup_InvalidateState( GLcontext *ctx, GLuint new_state ); -extern void -_swsetup_BuildProjectedVertices( GLcontext *ctx, - GLuint start, +extern void +_swsetup_BuildProjectedVertices( GLcontext *ctx, + GLuint start, GLuint end, GLuint new_inputs ); -extern void +extern void _swsetup_Quad( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ); -extern void +extern void _swsetup_Triangle( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2 ); -extern void +extern void _swsetup_Line( GLcontext *ctx, GLuint v0, GLuint v1 ); -extern void +extern void _swsetup_Points( GLcontext *ctx, GLuint first, GLuint last ); extern void @@ -69,20 +71,20 @@ _swsetup_RenderStart( GLcontext *ctx ); extern void _swsetup_RenderFinish( GLcontext *ctx ); -extern void +extern void _swsetup_RenderProjectInterpVerts( GLcontext *ctx ); -extern void -_swsetup_RenderInterp( GLcontext *ctx, GLfloat t, +extern void +_swsetup_RenderInterp( GLcontext *ctx, GLfloat t, GLuint dst, GLuint out, GLuint in, GLboolean force_boundary ); -extern void +extern void _swsetup_RenderCopyPV( GLcontext *ctx, GLuint dst, GLuint src ); -extern void +extern void _swsetup_RenderClippedPolygon( GLcontext *ctx, const GLuint *elts, GLuint n ); -extern void +extern void _swsetup_RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj ); |