summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i810/i810render.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2003-12-11 16:25:36 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2003-12-11 16:25:36 +0000
commit2dc621f3fdb585f23013aa3e220f2148f9405538 (patch)
treed4eb6b4a76b427143e88953bbec0284bf15e3ffc /src/mesa/drivers/dri/i810/i810render.c
parent5bcf52b4d6951f9058b5ef00cf2438b3bdfbeea0 (diff)
Updates to tnl_dd_dmatmp.h
- Allocate vertices explicitly, rather than trying to talk about dma buffers. - Clean up the various Flush() operations. - Don't allow fallbacks any longer. Provide a support function to detect them ahead o ftime Updates to tnl_dd_vbtmp.h - Get rid of power-of-two vertex strides. Pack all vertices tightly. - Get texunit 2,3 emit working coorrectly. Other stuff: - Get rid of lingering Ubyte color support. - Fix a few compiler warnings.
Diffstat (limited to 'src/mesa/drivers/dri/i810/i810render.c')
-rw-r--r--src/mesa/drivers/dri/i810/i810render.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/i810/i810render.c b/src/mesa/drivers/dri/i810/i810render.c
index d1c1adc3b7..19c5dc07c4 100644
--- a/src/mesa/drivers/dri/i810/i810render.c
+++ b/src/mesa/drivers/dri/i810/i810render.c
@@ -93,20 +93,6 @@ static const GLenum reduced_prim[GL_POLYGON+1] = {
GL_TRIANGLES
};
-/* Fallback to normal rendering.
- */
-static void VERT_FALLBACK( GLcontext *ctx,
- GLuint start,
- GLuint count,
- GLuint flags )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- 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 );
- I810_CONTEXT(ctx)->SetupNewInputs = VERT_BIT_POS;
-}
@@ -115,16 +101,17 @@ static void VERT_FALLBACK( GLcontext *ctx,
I810_STATECHANGE(imesa, 0); \
i810RasterPrimitive( ctx, reduced_prim[prim], hw_prim[prim] ); \
} while (0)
-#define NEW_PRIMITIVE() I810_STATECHANGE( imesa, 0 )
-#define NEW_BUFFER() I810_FIREVERTICES( imesa )
#define GET_CURRENT_VB_MAX_VERTS() \
(((int)imesa->vertex_high - (int)imesa->vertex_low) / (imesa->vertex_size*4))
#define GET_SUBSEQUENT_VB_MAX_VERTS() \
(I810_DMA_BUF_SZ-4) / (imesa->vertex_size * 4)
+#define ALLOC_VERTS( nr ) \
+ i810AllocDmaLow( imesa, nr * imesa->vertex_size * 4)
+#define EMIT_VERTS( ctx, j, nr, buf ) \
+ i810_emit_contiguous_verts(ctx, j, (j)+(nr), buf)
-#define EMIT_VERTS( ctx, j, nr ) \
- i810_emit_contiguous_verts(ctx, j, (j)+(nr))
+#define FLUSH() I810_FIREVERTICES( imesa )
#define TAG(x) i810_##x
@@ -146,7 +133,8 @@ static GLboolean i810_run_render( GLcontext *ctx,
/* Don't handle clipping or indexed vertices.
*/
- if (VB->ClipOrMask || imesa->RenderIndex != 0 || VB->Elts) {
+ if (imesa->RenderIndex != 0 ||
+ !i810_validate_render( ctx, VB )) {
return GL_TRUE;
}