diff options
author | Brian <[email protected]> | 2007-05-20 12:27:39 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-05-20 12:27:39 -0600 |
commit | 9e8a961dd7d7b717a9fb4ecdea1c1b60ea355efe (patch) | |
tree | 60c87644ec38f4693ceecbf440b120b02e2d07e6 /src/mesa/drivers/dri/mach64 | |
parent | aa133a9dae53bc6aa50b88ee43deb8b34e8d0029 (diff) |
Overhaul/simplify SWvertex and SWspan attribute handling.
Instead of separate fog/specular/texcoord/varying code, just treat all of
them as generic attributes. Simplifies the point/line/triangle functions.
Diffstat (limited to 'src/mesa/drivers/dri/mach64')
-rw-r--r-- | src/mesa/drivers/dri/mach64/mach64_native_vb.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/mach64/mach64_native_vb.c b/src/mesa/drivers/dri/mach64/mach64_native_vb.c index 81bcf802c71..75cf0e2ed2d 100644 --- a/src/mesa/drivers/dri/mach64/mach64_native_vb.c +++ b/src/mesa/drivers/dri/mach64/mach64_native_vb.c @@ -44,7 +44,7 @@ void TAG(translate_vertex)(GLcontext *ctx, UNVIEWPORT_VARS; CARD32 *p = (CARD32 *)src + 10 - mmesa->vertex_size; - dst->win[3] = 1.0; + dst->attrib[FRAG_ATTRIB_WPOS][3] = 1.0; switch ( format ) { case TEX1_VERTEX_FORMAT: @@ -75,17 +75,17 @@ void TAG(translate_vertex)(GLcontext *ctx, dst->attrib[FRAG_ATTRIB_TEX0][1] = LE32_IN_FLOAT( p++ ); #endif dst->attrib[FRAG_ATTRIB_TEX0][3] = 1.0; - dst->win[3] = LE32_IN_FLOAT( p++ ); + dst->attrib[FRAG_ATTRIB_WPOS][3] = LE32_IN_FLOAT( p++ ); case NOTEX_VERTEX_FORMAT: - dst->specular[2] = ((GLubyte *)p)[0]; - dst->specular[1] = ((GLubyte *)p)[1]; - dst->specular[0] = ((GLubyte *)p)[2]; - dst->attrib[FRAG_ATTRIB_FOGC][0] = ((GLubyte *)p)[3]; + dst->attrib[FRAG_ATTRIB_COL1][2] = UBYTE_TO_FLOAT(((GLubyte *)p)[0]); + dst->attrib[FRAG_ATTRIB_COL1][1] = UBYTE_TO_FLOAT(((GLubyte *)p)[1]); + dst->attrib[FRAG_ATTRIB_COL1][0] = UBYTE_TO_FLOAT(((GLubyte *)p)[2]); + dst->attrib[FRAG_ATTRIB_FOGC][0] = ((GLubyte *)p)[3]; /*XXX int->float?*/ p++; case TINY_VERTEX_FORMAT: - dst->win[2] = UNVIEWPORT_Z( LE32_IN( p++ ) ); + dst->attrib[FRAG_ATTRIB_WPOS][2] = UNVIEWPORT_Z( LE32_IN( p++ ) ); dst->color[2] = ((GLubyte *)p)[0]; dst->color[1] = ((GLubyte *)p)[1]; @@ -96,8 +96,8 @@ void TAG(translate_vertex)(GLcontext *ctx, { GLuint xy = LE32_IN( p ); - dst->win[0] = UNVIEWPORT_X( (GLfloat)(GLshort)( xy >> 16 ) ); - dst->win[1] = UNVIEWPORT_Y( (GLfloat)(GLshort)( xy & 0xffff ) ); + dst->attrib[FRAG_ATTRIB_WPOS][0] = UNVIEWPORT_X( (GLfloat)(GLshort)( xy >> 16 ) ); + dst->attrib[FRAG_ATTRIB_WPOS][1] = UNVIEWPORT_Y( (GLfloat)(GLshort)( xy & 0xffff ) ); } } |