diff options
Diffstat (limited to 'src/mesa/drivers/dri/mga')
-rw-r--r-- | src/mesa/drivers/dri/mga/Makefile.X11 | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/mga/mga_xmesa.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/mga/mgarender.c | 30 | ||||
-rw-r--r-- | src/mesa/drivers/dri/mga/mgavb.c | 2 |
4 files changed, 21 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/mga/Makefile.X11 b/src/mesa/drivers/dri/mga/Makefile.X11 index cb769838227..246a7451840 100644 --- a/src/mesa/drivers/dri/mga/Makefile.X11 +++ b/src/mesa/drivers/dri/mga/Makefile.X11 @@ -1,4 +1,3 @@ -# $Id: Makefile.X11,v 1.5 2003/10/21 06:05:41 jonsmirl Exp $ # Mesa 3-D graphics library # Version: 5.0 diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c index d95c0197ebb..11daf9aaf4f 100644 --- a/src/mesa/drivers/dri/mga/mga_xmesa.c +++ b/src/mesa/drivers/dri/mga/mga_xmesa.c @@ -261,9 +261,9 @@ mgaDestroyScreen(__DRIscreenPrivate *sPriv) } -extern const struct gl_pipeline_stage _mga_render_stage; +extern const struct tnl_pipeline_stage _mga_render_stage; -static const struct gl_pipeline_stage *mga_pipeline[] = { +static const struct tnl_pipeline_stage *mga_pipeline[] = { &_tnl_vertex_transform_stage, &_tnl_normal_transform_stage, &_tnl_lighting_stage, @@ -683,7 +683,7 @@ void mgaGetLock( mgaContextPtr mmesa, GLuint flags ) if (*(dPriv->pStamp) != mmesa->lastStamp) { mmesa->lastStamp = *(dPriv->pStamp); - mmesa->SetupNewInputs |= VERT_BIT_CLIP; + mmesa->SetupNewInputs |= VERT_BIT_POS; mmesa->dirty_cliprects = (MGA_FRONT|MGA_BACK); mgaUpdateRects( mmesa, (MGA_FRONT|MGA_BACK) ); } diff --git a/src/mesa/drivers/dri/mga/mgarender.c b/src/mesa/drivers/dri/mga/mgarender.c index 516a99099fd..5fb7af908c4 100644 --- a/src/mesa/drivers/dri/mga/mgarender.c +++ b/src/mesa/drivers/dri/mga/mgarender.c @@ -101,7 +101,7 @@ static void VERT_FALLBACK( GLcontext *ctx, GLuint start, GLuint count, tnl->Driver.Render.PrimitiveNotify( ctx, flags & PRIM_MODE_MASK ); tnl->Driver.Render.BuildVertices( ctx, start, count, ~0 ); tnl->Driver.Render.PrimTabVerts[flags&PRIM_MODE_MASK]( ctx, start, count, flags ); - MGA_CONTEXT(ctx)->SetupNewInputs |= VERT_BIT_CLIP; + MGA_CONTEXT(ctx)->SetupNewInputs |= VERT_BIT_POS; } #define LOCAL_VARS mgaContextPtr mmesa = MGA_CONTEXT(ctx) @@ -131,12 +131,12 @@ static void VERT_FALLBACK( GLcontext *ctx, GLuint start, GLuint count, static GLboolean mga_run_render( GLcontext *ctx, - struct gl_pipeline_stage *stage ) + struct tnl_pipeline_stage *stage ) { mgaContextPtr mmesa = MGA_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &tnl->vb; - GLuint i, length, flags = 0; + GLuint i; /* Don't handle clipping or indexed vertices or vertex manipulations. */ @@ -147,13 +147,17 @@ static GLboolean mga_run_render( GLcontext *ctx, tnl->Driver.Render.Start( ctx ); mmesa->SetupNewInputs = ~0; - for (i = VB->FirstPrimitive ; !(flags & PRIM_LAST) ; i += length) + for (i = 0 ; i < VB->PrimitiveCount ; i++) { - flags = VB->Primitive[i]; - length= VB->PrimitiveLength[i]; - if (length) - mga_render_tab_verts[flags & PRIM_MODE_MASK]( ctx, i, i + length, - flags ); + GLuint prim = VB->Primitive[i].mode; + GLuint start = VB->Primitive[i].start; + GLuint length = VB->Primitive[i].count; + + if (!length) + continue; + + mga_render_tab_verts[prim & PRIM_MODE_MASK]( ctx, start, start + length, + prim); } tnl->Driver.Render.Finish( ctx ); @@ -162,9 +166,9 @@ static GLboolean mga_run_render( GLcontext *ctx, } -static void mga_check_render( GLcontext *ctx, struct gl_pipeline_stage *stage ) +static void mga_check_render( GLcontext *ctx, struct tnl_pipeline_stage *stage ) { - GLuint inputs = VERT_BIT_CLIP | VERT_BIT_COLOR0; + GLuint inputs = VERT_BIT_POS | VERT_BIT_COLOR0; if (ctx->RenderMode == GL_RENDER) { if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) @@ -184,13 +188,13 @@ static void mga_check_render( GLcontext *ctx, struct gl_pipeline_stage *stage ) } -static void dtr( struct gl_pipeline_stage *stage ) +static void dtr( struct tnl_pipeline_stage *stage ) { (void)stage; } -const struct gl_pipeline_stage _mga_render_stage = +const struct tnl_pipeline_stage _mga_render_stage = { "mga render", (_DD_NEW_SEPARATE_SPECULAR | diff --git a/src/mesa/drivers/dri/mga/mgavb.c b/src/mesa/drivers/dri/mga/mgavb.c index 17dde2bba60..63de3563c45 100644 --- a/src/mesa/drivers/dri/mga/mgavb.c +++ b/src/mesa/drivers/dri/mga/mgavb.c @@ -362,7 +362,7 @@ void mgaBuildVertices( GLcontext *ctx, if (!newinputs) return; - if (newinputs & VERT_BIT_CLIP) { + if (newinputs & VERT_BIT_POS) { setup_tab[mmesa->SetupIndex].emit( ctx, start, count, v, stride ); } else { GLuint ind = 0; |