diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2003-12-11 16:25:36 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2003-12-11 16:25:36 +0000 |
commit | 2dc621f3fdb585f23013aa3e220f2148f9405538 (patch) | |
tree | d4eb6b4a76b427143e88953bbec0284bf15e3ffc /src/mesa/drivers/dri/gamma/gamma_render.c | |
parent | 5bcf52b4d6951f9058b5ef00cf2438b3bdfbeea0 (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/gamma/gamma_render.c')
-rw-r--r-- | src/mesa/drivers/dri/gamma/gamma_render.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/gamma/gamma_render.c b/src/mesa/drivers/dri/gamma/gamma_render.c index 67063c2e52..380c7b7044 100644 --- a/src/mesa/drivers/dri/gamma/gamma_render.c +++ b/src/mesa/drivers/dri/gamma/gamma_render.c @@ -115,17 +115,6 @@ static void gamma_emit( GLcontext *ctx, GLuint start, GLuint end) #define HAVE_ELTS 0 -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 ); - GAMMA_CONTEXT(ctx)->SetupNewInputs = VERT_BIT_POS; -} static const GLuint hw_prim[GL_POLYGON+1] = { B_PrimType_Points, @@ -163,14 +152,14 @@ static __inline void gammaEndPrimitive( gammaContextPtr gmesa ) #define LOCAL_VARS gammaContextPtr gmesa = GAMMA_CONTEXT(ctx) #define INIT( prim ) gammaStartPrimitive( gmesa, prim ) -#define FINISH gammaEndPrimitive( gmesa ) -#define NEW_PRIMITIVE() /* GAMMA_STATECHANGE( gmesa, 0 ) */ -#define NEW_BUFFER() /* GAMMA_FIREVERTICES( gmesa ) */ +#define FLUSH() gammaEndPrimitive( gmesa ) #define GET_CURRENT_VB_MAX_VERTS() \ (gmesa->bufSize - gmesa->bufCount) / 2 #define GET_SUBSEQUENT_VB_MAX_VERTS() \ GAMMA_DMA_BUFFER_SIZE / 2 -#define EMIT_VERTS( ctx, j, nr ) gamma_emit(ctx, j, (j)+(nr)) + +#define ALLOC_VERTS( nr ) (void *)0 /* todo: explicit alloc */ +#define EMIT_VERTS( ctx, j, nr, buf ) (gamma_emit(ctx, j, (j)+(nr)), (void *)0) #define TAG(x) gamma_##x #include "tnl_dd/t_dd_dmatmp.h" @@ -187,7 +176,7 @@ static GLboolean gamma_run_render( GLcontext *ctx, gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &tnl->vb; - GLuint i, length, flags = 0; + GLuint i; render_func *tab; /* GH: THIS IS A HACK!!! */ @@ -195,7 +184,7 @@ static GLboolean gamma_run_render( GLcontext *ctx, return GL_TRUE; /* don't handle clipping here */ /* We don't do elts */ - if (VB->Elts) + if (VB->Elts || !gamma_validate_render( ctx, VB )) return GL_TRUE; tab = TAG(render_tab_verts); |