aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/mga/mgarender.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2003-12-11 16:25:36 +0000
committerKeith Whitwell <[email protected]>2003-12-11 16:25:36 +0000
commit2dc621f3fdb585f23013aa3e220f2148f9405538 (patch)
treed4eb6b4a76b427143e88953bbec0284bf15e3ffc /src/mesa/drivers/dri/mga/mgarender.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/mga/mgarender.c')
-rw-r--r--src/mesa/drivers/dri/mga/mgarender.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/mga/mgarender.c b/src/mesa/drivers/dri/mga/mgarender.c
index 5fb7af908c4..58520098521 100644
--- a/src/mesa/drivers/dri/mga/mgarender.c
+++ b/src/mesa/drivers/dri/mga/mgarender.c
@@ -94,15 +94,6 @@ static void mgaDmaPrimitive( GLcontext *ctx, GLenum prim )
mgaRasterPrimitive( ctx, GL_TRIANGLES, hwprim );
}
-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 );
- MGA_CONTEXT(ctx)->SetupNewInputs |= VERT_BIT_POS;
-}
#define LOCAL_VARS mgaContextPtr mmesa = MGA_CONTEXT(ctx)
#define INIT( prim ) do { \
@@ -110,14 +101,17 @@ static void VERT_FALLBACK( GLcontext *ctx, GLuint start, GLuint count,
FLUSH_BATCH(mmesa); \
mgaDmaPrimitive( ctx, prim ); \
} while (0)
-#define NEW_PRIMITIVE() FLUSH_BATCH( mmesa )
-#define NEW_BUFFER() FLUSH_BATCH( mmesa )
+#define FLUSH() FLUSH_BATCH( mmesa )
#define GET_CURRENT_VB_MAX_VERTS() \
0 /* fix me */
#define GET_SUBSEQUENT_VB_MAX_VERTS() \
MGA_BUFFER_SIZE / (mmesa->vertex_size * 4)
-#define EMIT_VERTS( ctx, j, nr ) \
- mga_emit_contiguous_verts(ctx, j, (j)+(nr))
+
+
+#define ALLOC_VERTS( nr ) \
+ mgaAllocDmaLow( mmesa, nr * mmesa->vertex_size * 4)
+#define EMIT_VERTS( ctx, j, nr, buf ) \
+ mga_emit_contiguous_verts(ctx, j, (j)+(nr), buf)
#define TAG(x) mga_##x
@@ -140,7 +134,8 @@ static GLboolean mga_run_render( GLcontext *ctx,
/* Don't handle clipping or indexed vertices or vertex manipulations.
*/
- if (VB->ClipOrMask || mmesa->RenderIndex != 0 || VB->Elts) {
+ if (mmesa->RenderIndex != 0 ||
+ !mga_validate_render( ctx, VB )) {
return GL_TRUE;
}