Common subdirectories: mach64/CVS and mach64-sap-0/CVS diff -au -x '*swp' -x 'depend*' -x '*o' mach64/mach64_context.c mach64-sap-0/mach64_context.c --- mach64/mach64_context.c 2005-10-19 05:46:42.000000000 +0300 +++ mach64-sap-0/mach64_context.c 2006-04-04 22:08:27.000000000 +0300 @@ -221,7 +221,9 @@ driInitExtensions( ctx, card_extensions, GL_TRUE ); +#if MACH64_NATIVE_VTXFMT mach64InitVB( ctx ); +#endif mach64InitTriFuncs( ctx ); mach64DDInitStateFuncs( ctx ); mach64DDInitSpanFuncs( ctx ); @@ -275,7 +277,9 @@ _ac_DestroyContext( mmesa->glCtx ); _swrast_DestroyContext( mmesa->glCtx ); +#if MACH64_NATIVE_VTXFMT mach64FreeVB( mmesa->glCtx ); +#endif /* Free the vertex buffer */ if ( mmesa->vert_buf ) diff -au -x '*swp' -x 'depend*' -x '*o' mach64/mach64_context.h mach64-sap-0/mach64_context.h --- mach64/mach64_context.h 2006-04-04 18:51:58.000000000 +0300 +++ mach64-sap-0/mach64_context.h 2006-04-04 22:29:52.000000000 +0300 @@ -37,6 +37,7 @@ #include "mach64_drm.h" #include "mtypes.h" +#include "tnl/t_vertex.h" #include "mach64_reg.h" @@ -56,7 +57,10 @@ #define ENABLE_PERF_BOXES 1 /* Native vertex format */ -#define MACH64_NATIVE_VTXFMT 1 +#define MACH64_NATIVE_VTXFMT 0 + +/* premultiply texture coordinates by homogenous coordinate */ +/* #define MACH64_PREMULT_TEXCOORDS */ /* Flags for what context state needs to be updated: */ @@ -83,7 +87,8 @@ #define MACH64_FALLBACK_SEP_SPECULAR 0x0040 #define MACH64_FALLBACK_BLEND_EQ 0x0080 #define MACH64_FALLBACK_BLEND_FUNC 0x0100 -#define MACH64_FALLBACK_DISABLE 0x0200 +#define MACH64_FALLBACK_PROJTEX 0x0200 +#define MACH64_FALLBACK_DISABLE 0x0400 #define CARD32 GLuint /* KW: For building in mesa tree */ @@ -203,6 +208,15 @@ GLuint dirty; /* Hardware state to be updated */ drm_mach64_context_regs_t setup; + GLuint vertex_size; + GLuint vertex_format; + struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX]; + GLuint vertex_attr_count; + GLubyte *verts; /* points to tnl->clipspace.vertex_buf */ + GLuint num_verts; + int coloroffset, specoffset; + int tnl_state; /* tnl->render_inputs for this _tnl_install_attrs */ + GLuint NewGLState; GLuint Fallback; GLuint SetupIndex; @@ -210,11 +224,6 @@ GLuint RenderIndex; GLfloat hw_viewport[16]; GLfloat depth_scale; - GLuint vertex_size; - GLuint vertex_stride_shift; - GLuint vertex_format; - GLuint num_verts; - GLubyte *verts; CARD32 Color; /* Current draw color */ CARD32 ClearColor; /* Color used to clear color buffer */ diff -au -x '*swp' -x 'depend*' -x '*o' mach64/mach64_tex.c mach64-sap-0/mach64_tex.c --- mach64/mach64_tex.c 2004-05-31 03:58:34.000000000 +0300 +++ mach64-sap-0/mach64_tex.c 2006-04-04 22:13:23.000000000 +0300 @@ -593,6 +593,7 @@ functions->TexSubImage1D = mach64TexSubImage1D; functions->TexImage2D = mach64TexImage2D; functions->TexSubImage2D = mach64TexSubImage2D; +#if MACH64_NATIVE_VTXFMT functions->TexImage3D = _mesa_store_teximage3d; functions->TexSubImage3D = _mesa_store_texsubimage3d; functions->CopyTexImage1D = _swrast_copy_teximage1d; @@ -600,6 +601,7 @@ functions->CopyTexSubImage1D = _swrast_copy_texsubimage1d; functions->CopyTexSubImage2D = _swrast_copy_texsubimage2d; functions->CopyTexSubImage3D = _swrast_copy_texsubimage3d; +#endif functions->TexParameter = mach64DDTexParameter; functions->BindTexture = mach64DDBindTexture; functions->DeleteTexture = mach64DDDeleteTexture; diff -au -x '*swp' -x 'depend*' -x '*o' mach64/mach64_tris.c mach64-sap-0/mach64_tris.c --- mach64/mach64_tris.c 2006-04-04 22:35:27.000000000 +0300 +++ mach64-sap-0/mach64_tris.c 2006-04-04 22:31:44.000000000 +0300 @@ -565,6 +565,7 @@ LE32_OUT( &vb[vbidx++], (6 << 16) | ADRINDEX(MACH64_VERTEX_1_S) ); break; } + assert(vertsize == 6 || vertsize == 4 || vertsize == 8 || vertsize == 10); if (vertsize > 6) { LE32_OUT( &vb[vbidx++], v0->ui[6] ); /* MACH64_VERTEX_1_S */ LE32_OUT( &vb[vbidx++], v0->ui[7] ); /* MACH64_VERTEX_1_T */ @@ -1472,9 +1473,15 @@ { GLcontext *ctx = mmesa->glCtx; SWvertex v[3]; +#if MACH64_NATIVE_VTXFMT mach64_translate_vertex( ctx, v0, &v[0] ); mach64_translate_vertex( ctx, v1, &v[1] ); mach64_translate_vertex( ctx, v2, &v[2] ); +#else + _swsetup_Translate( ctx, v0, &v[0] ); + _swsetup_Translate( ctx, v1, &v[1] ); + _swsetup_Translate( ctx, v2, &v[2] ); +#endif _swrast_Triangle( ctx, &v[0], &v[1], &v[2] ); } @@ -1486,8 +1493,13 @@ { GLcontext *ctx = mmesa->glCtx; SWvertex v[2]; +#if MACH64_NATIVE_VTXFMT mach64_translate_vertex( ctx, v0, &v[0] ); mach64_translate_vertex( ctx, v1, &v[1] ); +#else + _swsetup_Translate( ctx, v0, &v[0] ); + _swsetup_Translate( ctx, v1, &v[1] ); +#endif _swrast_Line( ctx, &v[0], &v[1] ); } @@ -1498,7 +1510,11 @@ { GLcontext *ctx = mmesa->glCtx; SWvertex v[1]; +#if MACH64_NATIVE_VTXFMT mach64_translate_vertex( ctx, v0, &v[0] ); +#else + _swsetup_Translate( ctx, v0, &v[0] ); +#endif _swrast_Point( ctx, &v[0] ); } @@ -1577,6 +1593,15 @@ } #if MACH64_NATIVE_VTXFMT +/* + * Optimized version of mach64FastRenderClippedPoly(), it submits (n) vertices + * instead of (3 * n). Does not seem to improve performance over the simple one. + * + * FIXME: + * Further optimization is possible by consolidating the mach64AllocDmaLow() + * calls. However, doing so produces irrelevant colors/textures for the + * triangles of the polygon. + */ static void mach64FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts, GLuint n ) { @@ -1587,7 +1612,7 @@ GLuint xy; const GLuint xyoffset = 9; GLint xx[3], yy[3]; /* 2 fractional bits for hardware */ - unsigned vbsiz = (vertsize + (vertsize > 7 ? 2 : 1)) * n + (n-2); + unsigned vbsiz = (vertsize + (vertsize > 7 ? 2 : 1)) * 3 + 1; CARD32 *vb, *vbchk; GLubyte *mach64verts = (GLubyte *)mmesa->verts; mach64VertexPtr v0, v1, v2; @@ -1631,42 +1656,38 @@ COPY_VERTEX_OOA( vb, vertsize, v2, 3 ); LE32_OUT( vb++, *(CARD32 *)&ooa ); - i = 3; - while (1) { - if (i >= n) - break; - v0 = (mach64VertexPtr)VERT(elts[i]); - i++; + assert( vb == vbchk ); - xy = LE32_IN( &v0->ui[xyoffset] ); - xx[0] = (GLshort)( xy >> 16 ); - yy[0] = (GLshort)( xy & 0xffff ); - - a = (xx[0] - xx[2]) * (yy[1] - yy[2]) - - (yy[0] - yy[2]) * (xx[1] - xx[2]); - ooa = 16.0 / a; + /* draw triangles with vertices elts[0], elts[i-1], elts[i] */ + for (i = 3 ; i < n ; i++) { + unsigned vbsiz = (vertsize + (vertsize > 7 ? 2 : 1)) * 1 + 1; + mach64VertexPtr vk; + int k; - COPY_VERTEX_OOA( vb, vertsize, v0, 1 ); - LE32_OUT( vb++, *(CARD32 *)&ooa ); + /* odd elements use v0, even elements use v1 */ + k = 1 - (i & 0x1); + + vk = (mach64VertexPtr)VERT(elts[i]); + + xy = LE32_IN( &vk->ui[xyoffset] ); + xx[k] = (GLshort)( xy >> 16 ); + yy[k] = (GLshort)( xy & 0xffff ); - if (i >= n) - break; - v1 = (mach64VertexPtr)VERT(elts[i]); - i++; - - xy = LE32_IN( &v1->ui[xyoffset] ); - xx[1] = (GLshort)( xy >> 16 ); - yy[1] = (GLshort)( xy & 0xffff ); - a = (xx[0] - xx[2]) * (yy[1] - yy[2]) - (yy[0] - yy[2]) * (xx[1] - xx[2]); ooa = 16.0 / a; + + vb = (CARD32 *)mach64AllocDmaLow( mmesa, vbsiz * sizeof(CARD32) ); + vbchk = vb + vbsiz; - COPY_VERTEX_OOA( vb, vertsize, v1, 2 ); + if (k == 0) + COPY_VERTEX_OOA( vb, vertsize, vk, 1 ); + else + COPY_VERTEX_OOA( vb, vertsize, vk, 2 ); LE32_OUT( vb++, *(CARD32 *)&ooa ); + + assert( vb == vbchk ); } - - assert( vb == vbchk ); } #else static void mach64FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts, @@ -1771,8 +1792,10 @@ mach64DDUpdateHWState( ctx ); if (!mmesa->Fallback && mmesa->NewGLState) { +#if MACH64_NATIVE_VTXFMT if (mmesa->NewGLState & _MACH64_NEW_VERTEX_STATE) mach64ChooseVertexState( ctx ); +#endif if (mmesa->NewGLState & _MACH64_NEW_RENDER_STATE) mach64ChooseRenderState( ctx ); @@ -1819,6 +1842,7 @@ } +#if MACH64_NATIVE_VTXFMT static void mach64RenderStart( GLcontext *ctx ) { /* Check for projective texturing. Make sure all texcoord @@ -1826,6 +1850,127 @@ */ mach64CheckTexSizes( ctx ); } +#else +#define EMIT_ATTR( ATTR, STYLE, SIZE ) \ +do { \ + mmesa->vertex_attrs[mmesa->vertex_attr_count].attrib = (ATTR); \ + mmesa->vertex_attrs[mmesa->vertex_attr_count].format = (STYLE); \ + mmesa->vertex_attr_count++; \ + offset += (SIZE); \ +} while (0) + +#define EMIT_PAD( SIZE ) \ +do { \ + mmesa->vertex_attrs[mmesa->vertex_attr_count].attrib = 0; \ + mmesa->vertex_attrs[mmesa->vertex_attr_count].format = EMIT_PAD; \ + mmesa->vertex_attrs[mmesa->vertex_attr_count].offset = (SIZE); \ + mmesa->vertex_attr_count++; \ + offset += (SIZE); \ +} while (0) + +#define TINY_VERTEX_FORMAT 1 +#define NOTEX_VERTEX_FORMAT 2 +#define TEX0_VERTEX_FORMAT 3 +#define TEX1_VERTEX_FORMAT 4 + +static void mach64RenderStart( GLcontext *ctx ) +{ + mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &tnl->vb; + GLuint index = tnl->render_inputs; + GLuint vc_frmt = 0; + GLboolean fallback_projtex = GL_FALSE; + GLuint offset = 0; + + /* Important: */ + VB->AttribPtr[VERT_ATTRIB_POS] = VB->NdcPtr; + mmesa->vertex_attr_count = 0; + mmesa->specoffset = 0; + + if ( index & _TNL_BIT_TEX1 ) { + vc_frmt = TEX1_VERTEX_FORMAT; + } else if ( index & _TNL_BIT_TEX0 ) { + vc_frmt = TEX0_VERTEX_FORMAT; + } else if ( index & (_TNL_BIT_COLOR1|_TNL_BIT_FOG) ) { + vc_frmt = NOTEX_VERTEX_FORMAT; + } else { + vc_frmt = TINY_VERTEX_FORMAT; + } + + /* EMIT_ATTR's must be in order as they tell t_vertex.c how to + * build up a hardware vertex. + */ + if ( vc_frmt == TINY_VERTEX_FORMAT ) + EMIT_ATTR( _TNL_ATTRIB_POS, EMIT_3F_VIEWPORT, 12 ); + else + EMIT_ATTR( _TNL_ATTRIB_POS, EMIT_4F_VIEWPORT, 16 ); + + mmesa->coloroffset = offset; +#if MESA_LITTLE_ENDIAN + EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4UB_4F_BGRA, 4 ); +#else + EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4UB_4F_ARGB, 4 ); +#endif + + if ( vc_frmt >= NOTEX_VERTEX_FORMAT) { +#if MESA_LITTLE_ENDIAN + if ( index & _TNL_BIT_COLOR1) { + mmesa->specoffset = offset; + EMIT_ATTR( _TNL_ATTRIB_COLOR1, EMIT_3UB_3F_BGR, 3 ); + } else + EMIT_PAD( 3 ); + + if (index & _TNL_BIT_FOG) + EMIT_ATTR( _TNL_ATTRIB_FOG, EMIT_1UB_1F, 1 ); + else + EMIT_PAD( 1 ); +#else + if (index & _TNL_BIT_FOG) + EMIT_ATTR( _TNL_ATTRIB_FOG, EMIT_1UB_1F, 1 ); + else + EMIT_PAD( 1 ); + + if ( index & _TNL_BIT_COLOR1) { + mmesa->specoffset = offset; + EMIT_ATTR( _TNL_ATTRIB_COLOR1, EMIT_3UB_3F_RGB, 3 ); + } else + EMIT_PAD( 3 ); +#endif + } + + if ( vc_frmt >= TEX0_VERTEX_FORMAT ) { + if ( VB->TexCoordPtr[0]->size > 2 ) + fallback_projtex = GL_TRUE; + EMIT_ATTR( _TNL_ATTRIB_TEX0, EMIT_2F, 8 ); + } + if ( vc_frmt >= TEX1_VERTEX_FORMAT ) { + if ( VB->TexCoordPtr[1]->size > 2 ) + fallback_projtex = GL_TRUE; + EMIT_ATTR( _TNL_ATTRIB_TEX1, EMIT_2F, 8 ); + } + + /* projective textures are not supported by the hardware */ + FALLBACK( mmesa, MACH64_FALLBACK_PROJTEX, fallback_projtex ); + + /* Only need to change the vertex emit code if there has been a + * statechange to a TNL index. + */ + if ( index != mmesa->tnl_state ) { + FLUSH_BATCH( mmesa ); + mmesa->dirty |= MACH64_UPLOAD_CONTEXT; + + mmesa->vertex_size = + _tnl_install_attrs( ctx, + mmesa->vertex_attrs, + mmesa->vertex_attr_count, + mmesa->hw_viewport, 0 ); + mmesa->vertex_size >>= 2; + + mmesa->vertex_format = vc_frmt; + } +} +#endif static void mach64RenderFinish( GLcontext *ctx ) { @@ -1887,9 +2032,25 @@ tnl->Driver.Render.Start = mach64RenderStart; tnl->Driver.Render.PrimitiveNotify = mach64RenderPrimitive; tnl->Driver.Render.Finish = mach64RenderFinish; + +#if MACH64_NATIVE_VTXFMT tnl->Driver.Render.BuildVertices = mach64BuildVertices; mmesa->NewGLState |= (_MACH64_NEW_RENDER_STATE| _MACH64_NEW_VERTEX_STATE); +#else + tnl->Driver.Render.BuildVertices = _tnl_build_vertices; + tnl->Driver.Render.CopyPV = _tnl_copy_pv; + tnl->Driver.Render.Interp = _tnl_interp; + + _tnl_invalidate_vertex_state( ctx, ~0 ); + _tnl_invalidate_vertices( ctx, ~0 ); + _tnl_install_attrs( ctx, + mmesa->vertex_attrs, + mmesa->vertex_attr_count, + mmesa->hw_viewport, 0 ); + + mmesa->NewGLState |= _MACH64_NEW_RENDER_STATE; +#endif if (MACH64_DEBUG & DEBUG_VERBOSE_FALLBACK) { fprintf(stderr, "Mach64 end rasterization fallback: 0x%x %s\n", bit, getFallbackString(bit)); @@ -1904,6 +2065,7 @@ void mach64InitTriFuncs( GLcontext *ctx ) { + mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx); static int firsttime = 1; @@ -1917,5 +2079,18 @@ tnl->Driver.Render.Finish = mach64RenderFinish; tnl->Driver.Render.PrimitiveNotify = mach64RenderPrimitive; tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple; +#if MACH64_NATIVE_VTXFMT tnl->Driver.Render.BuildVertices = mach64BuildVertices; +#else + tnl->Driver.Render.BuildVertices = _tnl_build_vertices; + tnl->Driver.Render.CopyPV = _tnl_copy_pv; + tnl->Driver.Render.Interp = _tnl_interp; + + _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12, + (6 + 2 * ctx->Const.MaxTextureUnits) * sizeof(GLfloat) ); + mmesa->verts = (char *)tnl->clipspace.vertex_buf; + mmesa->tnl_state = -1; + + mmesa->NewGLState |= _MACH64_NEW_RENDER_STATE; +#endif } diff -au -x '*swp' -x 'depend*' -x '*o' mach64/mach64_vb.c mach64-sap-0/mach64_vb.c --- mach64/mach64_vb.c 2004-07-01 16:14:05.000000000 +0300 +++ mach64-sap-0/mach64_vb.c 2006-04-04 22:26:19.000000000 +0300 @@ -45,6 +45,7 @@ #include "mach64_state.h" +#if MACH64_NATIVE_VTXFMT #define MACH64_TEX1_BIT 0x1 #define MACH64_TEX0_BIT 0x2 #define MACH64_RGBA_BIT 0x4 @@ -107,25 +108,12 @@ (GLfloat)mmesa->drawY + SUBPIXEL_Y); \ const GLfloat sz = 1.0 / mmesa->depth_scale -#if MACH64_NATIVE_VTXFMT - #define UNVIEWPORT_X(x) ((GLfloat)(x) / 4.0) + dx #define UNVIEWPORT_Y(y) - ((GLfloat)(y) / 4.0) + dy #define UNVIEWPORT_Z(z) (GLfloat)((z) >> 15) * sz -#else - -#define UNVIEWPORT_X(x) x + dx; -#define UNVIEWPORT_Y(y) - y + dy; -#define UNVIEWPORT_Z(z) z * sz; - -#endif - #define PTEX_FALLBACK() FALLBACK(MACH64_CONTEXT(ctx), MACH64_FALLBACK_TEXTURE, 1) -#define IMPORT_FLOAT_COLORS mach64_import_float_colors -#define IMPORT_FLOAT_SPEC_COLORS mach64_import_float_spec_colors - #define INTERP_VERTEX setup_tab[mmesa->SetupIndex].interp #define COPY_PV_VERTEX setup_tab[mmesa->SetupIndex].copy_pv @@ -133,25 +121,14 @@ * Generate pv-copying and translation functions * ***********************************************************************/ -#if MACH64_NATIVE_VTXFMT - #define TAG(x) mach64_##x #include "mach64_native_vb.c" -#else - -#define TAG(x) mach64_##x -#include "tnl_dd/t_dd_vb.c" - -#endif - /*********************************************************************** * Generate vertex emit and interp functions * ***********************************************************************/ -#if MACH64_NATIVE_VTXFMT - #define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT) #define TAG(x) x##_wg #include "mach64_native_vbtmp.h" @@ -292,150 +269,6 @@ #define TAG(x) x##_gfst0t1 #include "mach64_native_vbtmp.h" -#else - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT) -#define TAG(x) x##_wg -#include "mach64_vbtmp.h" - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT|MACH64_SPEC_BIT) -#define TAG(x) x##_wgs -#include "mach64_vbtmp.h" - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT|MACH64_TEX0_BIT) -#define TAG(x) x##_wgt0 -#include "mach64_vbtmp.h" - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT|MACH64_TEX0_BIT|MACH64_TEX1_BIT) -#define TAG(x) x##_wgt0t1 -#include "mach64_vbtmp.h" - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT|MACH64_TEX0_BIT|MACH64_PTEX_BIT) -#define TAG(x) x##_wgpt0 -#include "mach64_vbtmp.h" - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT|MACH64_SPEC_BIT|MACH64_TEX0_BIT) -#define TAG(x) x##_wgst0 -#include "mach64_vbtmp.h" - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT|MACH64_SPEC_BIT|MACH64_TEX0_BIT|\ - MACH64_TEX1_BIT) -#define TAG(x) x##_wgst0t1 -#include "mach64_vbtmp.h" - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT|MACH64_SPEC_BIT|MACH64_TEX0_BIT|\ - MACH64_PTEX_BIT) -#define TAG(x) x##_wgspt0 -#include "mach64_vbtmp.h" - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT|MACH64_FOG_BIT) -#define TAG(x) x##_wgf -#include "mach64_vbtmp.h" - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT|MACH64_FOG_BIT|MACH64_SPEC_BIT) -#define TAG(x) x##_wgfs -#include "mach64_vbtmp.h" - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT|MACH64_FOG_BIT|MACH64_TEX0_BIT) -#define TAG(x) x##_wgft0 -#include "mach64_vbtmp.h" - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT|MACH64_FOG_BIT|MACH64_TEX0_BIT|\ - MACH64_TEX1_BIT) -#define TAG(x) x##_wgft0t1 -#include "mach64_vbtmp.h" - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT|MACH64_FOG_BIT|MACH64_TEX0_BIT|\ - MACH64_PTEX_BIT) -#define TAG(x) x##_wgfpt0 -#include "mach64_vbtmp.h" - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT|MACH64_FOG_BIT|MACH64_SPEC_BIT|\ - MACH64_TEX0_BIT) -#define TAG(x) x##_wgfst0 -#include "mach64_vbtmp.h" - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT|MACH64_FOG_BIT|MACH64_SPEC_BIT|\ - MACH64_TEX0_BIT|MACH64_TEX1_BIT) -#define TAG(x) x##_wgfst0t1 -#include "mach64_vbtmp.h" - -#define IND (MACH64_XYZW_BIT|MACH64_RGBA_BIT|MACH64_FOG_BIT|MACH64_SPEC_BIT|\ - MACH64_TEX0_BIT|MACH64_PTEX_BIT) -#define TAG(x) x##_wgfspt0 -#include "mach64_vbtmp.h" - -#define IND (MACH64_TEX0_BIT) -#define TAG(x) x##_t0 -#include "mach64_vbtmp.h" - -#define IND (MACH64_TEX0_BIT|MACH64_TEX1_BIT) -#define TAG(x) x##_t0t1 -#include "mach64_vbtmp.h" - -#define IND (MACH64_FOG_BIT) -#define TAG(x) x##_f -#include "mach64_vbtmp.h" - -#define IND (MACH64_FOG_BIT|MACH64_TEX0_BIT) -#define TAG(x) x##_ft0 -#include "mach64_vbtmp.h" - -#define IND (MACH64_FOG_BIT|MACH64_TEX0_BIT|MACH64_TEX1_BIT) -#define TAG(x) x##_ft0t1 -#include "mach64_vbtmp.h" - -#define IND (MACH64_RGBA_BIT) -#define TAG(x) x##_g -#include "mach64_vbtmp.h" - -#define IND (MACH64_RGBA_BIT|MACH64_SPEC_BIT) -#define TAG(x) x##_gs -#include "mach64_vbtmp.h" - -#define IND (MACH64_RGBA_BIT|MACH64_TEX0_BIT) -#define TAG(x) x##_gt0 -#include "mach64_vbtmp.h" - -#define IND (MACH64_RGBA_BIT|MACH64_TEX0_BIT|MACH64_TEX1_BIT) -#define TAG(x) x##_gt0t1 -#include "mach64_vbtmp.h" - -#define IND (MACH64_RGBA_BIT|MACH64_SPEC_BIT|MACH64_TEX0_BIT) -#define TAG(x) x##_gst0 -#include "mach64_vbtmp.h" - -#define IND (MACH64_RGBA_BIT|MACH64_SPEC_BIT|MACH64_TEX0_BIT|MACH64_TEX1_BIT) -#define TAG(x) x##_gst0t1 -#include "mach64_vbtmp.h" - -#define IND (MACH64_RGBA_BIT|MACH64_FOG_BIT) -#define TAG(x) x##_gf -#include "mach64_vbtmp.h" - -#define IND (MACH64_RGBA_BIT|MACH64_FOG_BIT|MACH64_SPEC_BIT) -#define TAG(x) x##_gfs -#include "mach64_vbtmp.h" - -#define IND (MACH64_RGBA_BIT|MACH64_FOG_BIT|MACH64_TEX0_BIT) -#define TAG(x) x##_gft0 -#include "mach64_vbtmp.h" - -#define IND (MACH64_RGBA_BIT|MACH64_FOG_BIT|MACH64_TEX0_BIT|MACH64_TEX1_BIT) -#define TAG(x) x##_gft0t1 -#include "mach64_vbtmp.h" - -#define IND (MACH64_RGBA_BIT|MACH64_FOG_BIT|MACH64_SPEC_BIT|MACH64_TEX0_BIT) -#define TAG(x) x##_gfst0 -#include "mach64_vbtmp.h" - -#define IND (MACH64_RGBA_BIT|MACH64_FOG_BIT|MACH64_SPEC_BIT|MACH64_TEX0_BIT|\ - MACH64_TEX1_BIT) -#define TAG(x) x##_gfst0t1 -#include "mach64_vbtmp.h" - -#endif - static void init_setup_tab( void ) { init_wg(); @@ -640,3 +473,4 @@ mmesa->verts = 0; } } +#endif diff -au -x '*swp' -x 'depend*' -x '*o' mach64/mach64_vb.h mach64-sap-0/mach64_vb.h --- mach64/mach64_vb.h 2006-04-04 18:51:51.000000000 +0300 +++ mach64-sap-0/mach64_vb.h 2006-04-04 22:14:50.000000000 +0300 @@ -36,9 +36,6 @@ #include "swrast/swrast.h" #include "mach64_context.h" -/* premultiply texture coordinates by homogenous coordinate */ -#define MACH64_PREMULT_TEXCOORDS - #define _MACH64_NEW_VERTEX_STATE (_DD_NEW_SEPARATE_SPECULAR | \ _DD_NEW_TRI_LIGHT_TWOSIDE | \ _DD_NEW_TRI_UNFILLED | \ Only in mach64: mach64_vbtmp.h Common subdirectories: mach64/server and mach64-sap-0/server