summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/mga
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2003-11-24 15:21:14 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2003-11-24 15:21:14 +0000
commit57c9814b9e87924696df4c741861c29d4236d1eb (patch)
tree63c9139693032c681fad3e7b50d743b762e0a64d /src/mesa/drivers/dri/mga
parent5b5cf9cb8b3f540365e3da8e4a70f6a5040a1c6c (diff)
Import vtx-0-2-branch
Diffstat (limited to 'src/mesa/drivers/dri/mga')
-rw-r--r--src/mesa/drivers/dri/mga/Makefile.X111
-rw-r--r--src/mesa/drivers/dri/mga/mga_xmesa.c6
-rw-r--r--src/mesa/drivers/dri/mga/mgarender.c30
-rw-r--r--src/mesa/drivers/dri/mga/mgavb.c2
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 cb76983822..246a745184 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 d95c0197eb..11daf9aaf4 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 516a99099f..5fb7af908c 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 17dde2bba6..63de3563c4 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;