summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i810/i810tris.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/i810tris.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/i810tris.c')
-rw-r--r--src/mesa/drivers/dri/i810/i810tris.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i810/i810tris.c b/src/mesa/drivers/dri/i810/i810tris.c
index e3e2afb3f2..b035b9beb0 100644
--- a/src/mesa/drivers/dri/i810/i810tris.c
+++ b/src/mesa/drivers/dri/i810/i810tris.c
@@ -232,7 +232,7 @@ static struct {
#define VERT_Y(_v) _v->v.y
#define VERT_Z(_v) _v->v.z
#define AREA_IS_CCW( a ) (a > 0)
-#define GET_VERTEX(e) (imesa->verts + (e<<imesa->vertex_stride_shift))
+#define GET_VERTEX(e) (imesa->verts + (e * imesa->vertex_size * sizeof(int)))
#define VERT_SET_RGBA( v, c ) \
do { \
@@ -445,7 +445,7 @@ i810_fallback_point( i810ContextPtr imesa,
/**********************************************************************/
#define IND 0
-#define V(x) (i810Vertex *)(vertptr + ((x)<<vertshift))
+#define V(x) (i810Vertex *)(vertptr + ((x)*vertsize*sizeof(int)))
#define RENDER_POINTS( start, count ) \
for ( ; start < count ; start++) POINT( V(ELT(start)) );
#define RENDER_LINE( v0, v1 ) LINE( V(v0), V(v1) )
@@ -456,7 +456,7 @@ i810_fallback_point( i810ContextPtr imesa,
#define LOCAL_VARS \
i810ContextPtr imesa = I810_CONTEXT(ctx); \
GLubyte *vertptr = (GLubyte *)imesa->verts; \
- const GLuint vertshift = imesa->vertex_stride_shift; \
+ const GLuint vertsize = imesa->vertex_size; \
const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \
(void) elt;
#define RESET_STIPPLE
@@ -514,7 +514,6 @@ static void i810FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
GLuint vertsize = imesa->vertex_size;
GLuint *vb = i810AllocDmaLow( imesa, (n-2) * 3 * 4 * vertsize );
GLubyte *vertptr = (GLubyte *)imesa->verts;
- const GLuint vertshift = imesa->vertex_stride_shift;
const GLuint *start = (const GLuint *)V(elts[0]);
int i,j;