From dd34fe8679fa200e55cfaf8e80bbecdecea084e3 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 5 Feb 2007 10:10:01 -0700 Subject: Merge SWvertex texcoord and varying fields into attrib[] array field. Fragment texcoords and varying code is now unified in the point/line/triangle rasterization code. In the future, merge color, fog, etc. attribs. --- src/mesa/swrast_setup/ss_context.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/mesa/swrast_setup') diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c index f17e69bfb2..e1b60d0e85 100644 --- a/src/mesa/swrast_setup/ss_context.c +++ b/src/mesa/swrast_setup/ss_context.c @@ -145,7 +145,7 @@ _swsetup_RenderStart( GLcontext *ctx ) if (RENDERINPUTS_TEST_RANGE( index_bitset, _TNL_FIRST_TEX, _TNL_LAST_TEX )) { for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) { if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX(i) )) { - EMIT_ATTR( _TNL_ATTRIB_TEX(i), EMIT_4F, texcoord[i] ); + EMIT_ATTR( _TNL_ATTRIB_TEX(i), EMIT_4F, attrib[FRAG_ATTRIB_TEX0 + i] ); } } } @@ -156,7 +156,7 @@ _swsetup_RenderStart( GLcontext *ctx ) for (i = 0; i < ctx->Const.MaxVarying; i++) { if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_GENERIC(i) )) { EMIT_ATTR( _TNL_ATTRIB_GENERIC(i), VARYING_EMIT_STYLE, - varying[i] ); + attrib[FRAG_ATTRIB_VAR0 + i] ); } } } @@ -242,8 +242,13 @@ _swsetup_Translate( GLcontext *ctx, const void *vertex, SWvertex *dest ) for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++) - _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_TEX0+i, dest->texcoord[i] ); - + _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_TEX0+i, + dest->attrib[FRAG_ATTRIB_TEX0 + i] ); + + for (i = 0 ; i < ctx->Const.MaxVarying ; i++) + _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_GENERIC0+i, + dest->attrib[FRAG_ATTRIB_VAR0 + i] ); + _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR0, tmp ); UNCLAMPED_FLOAT_TO_RGBA_CHAN( dest->color, tmp ); -- cgit v1.2.3