summaryrefslogtreecommitdiff
path: root/src/mesa/swrast_setup
diff options
context:
space:
mode:
authorBrian <brian@nostromo.localnet.net>2007-02-05 10:10:01 -0700
committerBrian <brian@nostromo.localnet.net>2007-02-05 10:10:01 -0700
commitdd34fe8679fa200e55cfaf8e80bbecdecea084e3 (patch)
tree329b7c0280a198b8dabd02a5afb97dcaa5f3f4bd /src/mesa/swrast_setup
parent93b975a1d9fcc4a10987676f7368809522f27d71 (diff)
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.
Diffstat (limited to 'src/mesa/swrast_setup')
-rw-r--r--src/mesa/swrast_setup/ss_context.c13
1 files changed, 9 insertions, 4 deletions
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 );