summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i810
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2003-11-24 15:21:14 +0000
committerKeith Whitwell <[email protected]>2003-11-24 15:21:14 +0000
commit57c9814b9e87924696df4c741861c29d4236d1eb (patch)
tree63c9139693032c681fad3e7b50d743b762e0a64d /src/mesa/drivers/dri/i810
parent5b5cf9cb8b3f540365e3da8e4a70f6a5040a1c6c (diff)
Import vtx-0-2-branch
Diffstat (limited to 'src/mesa/drivers/dri/i810')
-rw-r--r--src/mesa/drivers/dri/i810/Makefile.X111
-rw-r--r--src/mesa/drivers/dri/i810/i810context.c4
-rw-r--r--src/mesa/drivers/dri/i810/i810render.c32
-rw-r--r--src/mesa/drivers/dri/i810/i810screen.c2
-rw-r--r--src/mesa/drivers/dri/i810/i810vb.c2
5 files changed, 22 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/i810/Makefile.X11 b/src/mesa/drivers/dri/i810/Makefile.X11
index 9fd5a5a3e59..8f9c7958ba2 100644
--- a/src/mesa/drivers/dri/i810/Makefile.X11
+++ b/src/mesa/drivers/dri/i810/Makefile.X11
@@ -1,4 +1,3 @@
-# $Id: Makefile.X11,v 1.2 2003/10/20 02:17:32 jonsmirl Exp $
# Mesa 3-D graphics library
# Version: 5.0
diff --git a/src/mesa/drivers/dri/i810/i810context.c b/src/mesa/drivers/dri/i810/i810context.c
index da1764cefad..d678aabc824 100644
--- a/src/mesa/drivers/dri/i810/i810context.c
+++ b/src/mesa/drivers/dri/i810/i810context.c
@@ -107,9 +107,9 @@ static const char * const card_extensions[] =
NULL
};
-extern const struct gl_pipeline_stage _i810_render_stage;
+extern const struct tnl_pipeline_stage _i810_render_stage;
-static const struct gl_pipeline_stage *i810_pipeline[] = {
+static const struct tnl_pipeline_stage *i810_pipeline[] = {
&_tnl_vertex_transform_stage,
&_tnl_normal_transform_stage,
&_tnl_lighting_stage,
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 |
diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c
index 604d56e2c27..53f1251fa9d 100644
--- a/src/mesa/drivers/dri/i810/i810screen.c
+++ b/src/mesa/drivers/dri/i810/i810screen.c
@@ -74,7 +74,7 @@ static drmBufMapPtr i810_create_empty_buffers(void)
memset(retval, 0, sizeof(drmBufMap));
retval->list = (drmBufPtr)ALIGN_MALLOC(sizeof(drmBuf) * I810_DMA_BUF_NR, 32);
if(retval->list == NULL) {
- FREE(retval);
+ ALIGN_FREE(retval);
return NULL;
}
memset(retval->list, 0, sizeof(drmBuf) * I810_DMA_BUF_NR);
diff --git a/src/mesa/drivers/dri/i810/i810vb.c b/src/mesa/drivers/dri/i810/i810vb.c
index ada7f6db853..58979ceac23 100644
--- a/src/mesa/drivers/dri/i810/i810vb.c
+++ b/src/mesa/drivers/dri/i810/i810vb.c
@@ -383,7 +383,7 @@ void i810BuildVertices( GLcontext *ctx,
if (!newinputs)
return;
- if (newinputs & VERT_BIT_CLIP) {
+ if (newinputs & VERT_BIT_POS) {
setup_tab[imesa->SetupIndex].emit( ctx, start, count, v, stride );
} else {
GLuint ind = 0;