diff options
author | alanh <alanh> | 2000-11-30 15:52:57 +0000 |
---|---|---|
committer | alanh <alanh> | 2000-11-30 15:52:57 +0000 |
commit | 4a325885c04479b7b5a63de9fd8fae200db024a3 (patch) | |
tree | 7c1da6b10b61f3f36bf843895420b7b096739ade | |
parent | 841bef4a6c8026d6f3ffbcde5a892b127b797236 (diff) |
fix more cliprect problems when using DrawElements (isosurf was candidatetdfx-3-0-0-20001201-freeze
test bed).
-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]; \ |