summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i810/i810render.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i810/i810render.c')
-rw-r--r--src/mesa/drivers/dri/i810/i810render.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i810/i810render.c b/src/mesa/drivers/dri/i810/i810render.c
index 8d388d88b3f..d1c1adc3b7c 100644
--- a/src/mesa/drivers/dri/i810/i810render.c
+++ b/src/mesa/drivers/dri/i810/i810render.c
@@ -105,7 +105,7 @@ static void VERT_FALLBACK( GLcontext *ctx,
tnl->Driver.Render.BuildVertices( ctx, start, count, ~0 );
tnl->Driver.Render.PrimTabVerts[flags&PRIM_MODE_MASK]( ctx, start,
count, flags );
- I810_CONTEXT(ctx)->SetupNewInputs = VERT_BIT_CLIP;
+ I810_CONTEXT(ctx)->SetupNewInputs = VERT_BIT_POS;
}
@@ -137,12 +137,12 @@ static void VERT_FALLBACK( GLcontext *ctx,
static GLboolean i810_run_render( GLcontext *ctx,
- struct gl_pipeline_stage *stage )
+ struct tnl_pipeline_stage *stage )
{
i810ContextPtr imesa = I810_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.
*/
@@ -150,17 +150,21 @@ static GLboolean i810_run_render( GLcontext *ctx,
return GL_TRUE;
}
- imesa->SetupNewInputs = VERT_BIT_CLIP;
+ imesa->SetupNewInputs = VERT_BIT_POS;
tnl->Driver.Render.Start( ctx );
- 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)
- i810_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;
+
+ i810_render_tab_verts[prim & PRIM_MODE_MASK]( ctx, start, start + length,
+ prim );
}
tnl->Driver.Render.Finish( ctx );
@@ -169,9 +173,9 @@ static GLboolean i810_run_render( GLcontext *ctx,
}
-static void i810_check_render( GLcontext *ctx, struct gl_pipeline_stage *stage )
+static void i810_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)
@@ -191,13 +195,13 @@ static void i810_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 _i810_render_stage =
+const struct tnl_pipeline_stage _i810_render_stage =
{
"i810 render",
(_DD_NEW_SEPARATE_SPECULAR |