diff options
-rw-r--r-- | xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c | 17 | ||||
-rw-r--r-- | xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.c | 6 |
2 files changed, 16 insertions, 7 deletions
diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c index c4256f157..1f9565afb 100644 --- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c +++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c @@ -13,6 +13,7 @@ #include "pipeline.h" #include "vbindirect.h" +#include "stages.h" static struct { points_func points; @@ -231,14 +232,28 @@ do { \ static void tdfxDDRenderEltsRaw( struct vertex_buffer *VB ) { GLcontext *ctx = VB->ctx; + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); struct vertex_buffer *OldVB = ctx->VB; GLenum prim = ctx->CVA.elt_mode; GLuint nr = VB->EltPtr->count; render_func func = tdfx_render_tab_elts[prim]; + GLuint p = 0; + + gl_import_client_data( VB, ctx->RenderFlags, + (VB->ClipOrMask + ? VEC_WRITABLE|VEC_GOOD_STRIDE + : VEC_GOOD_STRIDE)); ctx->VB = VB; ctx->Driver.RenderStart( ctx ); - func( VB, 0, nr, 0 ); + + BEGIN_CLIP_LOOP_LOCKED( fxMesa ); + do { + func( VB, 0, nr, 0 ); + } while ( ctx->Driver.MultipassFunc && + ctx->Driver.MultipassFunc( VB, ++p ) ); + END_CLIP_LOOP_LOCKED( fxMesa ); + ctx->Driver.RenderFinish( ctx ); ctx->VB = OldVB; } diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.c index d9af0fafd..163632bdd 100644 --- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.c +++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.c @@ -11,7 +11,6 @@ #include "tdfx_context.h" #include "tdfx_vb.h" -#include "stages.h" #include "mem.h" @@ -113,11 +112,6 @@ static void name( struct vertex_buffer *VB, GLuint start, GLuint end ) \ \ if (0) fprintf(stderr, "%s\n", __FUNCTION__); \ \ - gl_import_client_data( VB, VB->ctx->RenderFlags, \ - (VB->ClipOrMask \ - ? VEC_WRITABLE | VEC_GOOD_STRIDE \ - : VEC_GOOD_STRIDE) ); \ - \ tc0 = VB->TexCoordPtr[fxMesa->tmu_source[0]]->data; \ tc1 = VB->TexCoordPtr[fxMesa->tmu_source[1]]->data; \ color = VB->Color[0]->data[start]; \ |