#define MGA_MAX_TRIFUNC 0x20
static struct {
- points_func points;
- line_func line;
- triangle_func triangle;
- quad_func quad;
+ tnl_points_func points;
+ tnl_line_func line;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[MGA_MAX_TRIFUNC];
#define DO_FALLBACK (IND & MGA_FALLBACK_BIT)
#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) (mmesa->verts + (e<<mmesa->vertex_stride_shift))
+#define GET_VERTEX(e) (mmesa->verts + (e * mmesa->vertex_size * sizeof(int)))
#define VERT_SET_RGBA( v, c ) \
do { \
/**********************************************************************/
-#define VERT(x) (mgaVertex *)(vertptr + ((x)<<vertshift))
+#define VERT(x) (mgaVertex *)(vertptr + ((x)*vertex_size*sizeof(int)))
#define RENDER_POINTS( start, count ) \
for ( ; start < count ; start++) \
mga_draw_point( mmesa, VERT(ELT(start)) );
#define LOCAL_VARS \
mgaContextPtr mmesa = MGA_CONTEXT(ctx); \
GLubyte *vertptr = (GLubyte *)mmesa->verts; \
- const GLuint vertshift = mmesa->vertex_stride_shift; \
+ const GLuint vertex_size = mmesa->vertex_size; \
const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \
(void) elt;
#define RESET_STIPPLE
GLuint vertex_size = mmesa->vertex_size;
GLuint *vb = mgaAllocDmaLow( mmesa, (n-2) * 3 * 4 * vertex_size );
GLubyte *vertptr = (GLubyte *)mmesa->verts;
- const GLuint vertshift = mmesa->vertex_stride_shift;
const GLuint *start = (const GLuint *)VERT(elts[0]);
int i,j;
"glRenderMode(selection or feedback)",
"No hardware stencil",
"glDepthFunc( GL_NEVER )",
- "Mixing GL_CLAMP_TO_EDGE and GL_CLAMP"
+ "Mixing GL_CLAMP_TO_EDGE and GL_CLAMP",
+ "rasterization fallback option"
};
static const char *getFallbackString(GLuint bit)