diff options
author | Stephane Marchesin <marchesin@icps.u-strasbg.fr> | 2006-09-17 11:58:52 +0000 |
---|---|---|
committer | Stephane Marchesin <marchesin@icps.u-strasbg.fr> | 2006-09-17 11:58:52 +0000 |
commit | 908388b11841c50c94c1c746819276809a545a32 (patch) | |
tree | d9d263f37e00316aec7545cb74f9f007359901e8 /src/mesa/drivers/dri/nouveau/nv10_swtcl.c | |
parent | ae481e1560d0c99b6fb2c4b240f9b99dafd9c4b1 (diff) |
Some work towards making the nv10 swtcl compile
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nv10_swtcl.c')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 31a54b3e5c..0ddc466d5b 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -171,7 +171,7 @@ static inline void nv10_draw_point(nouveauContextPtr nmesa, #define LOCAL_VARS \ nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); \ const char *nouveauverts = (char *)nmesa->verts; -#define VERT(x) (r200Vertex *)(r200verts + ((x) * vertsize * sizeof(int))) +#define VERT(x) (nouveauVertex *)(nouveauverts + ((x) * vertsize * sizeof(int))) #define VERTEX nouveauVertex #undef TAG @@ -182,10 +182,39 @@ static inline void nv10_draw_point(nouveauContextPtr nmesa, * Macros for nouveau_dd_tritmp.h to draw basic primitives * ***********************************************************************/ -#define QUAD( a, b, c, d ) nouveau_quad( nmesa, a, b, c, d ) -#define TRI( a, b, c ) nouveau_triangle( nmesa, a, b, c ) -#define LINE( a, b ) nouveau_line( nmesa, a, b ) -#define POINT( a ) nouveau_point( nmesa, a ) +#define TRI(a, b, c) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_tri(nmesa, a, b, c); \ + else \ + nv10_draw_triangle(nmesa, a, b, c); \ + } while (0) + +#define QUAD(a, b, c, d) \ + do { \ + if (DO_FALLBACK) { \ + nmesa->draw_tri(nmesa, a, b, d); \ + nmesa->draw_tri(nmesa, b, c, d); \ + } \ + else \ + nv10_draw_quad(nmesa, a, b, c, d); \ + } while (0) + +#define LINE(v0, v1) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_line(nmesa, v0, v1); \ + else \ + nv10_draw_line(nmesa, v0, v1); \ + } while (0) + +#define POINT(v0) \ + do { \ + if (DO_FALLBACK) \ + nmesa->draw_point(nmesa, v0); \ + else \ + nv10_draw_point(nmesa, v0); \ + } while (0) #undef TAG @@ -467,7 +496,7 @@ static void nouveauRenderClippedPoly(GLcontext *ctx, const GLuint *elts, { TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; - GLuint prim = NOUVEAU_CONTEXT(ctx)->renderPrimitive; + GLuint prim = NOUVEAU_CONTEXT(ctx)->current_primitive; /* Render the new vertices as an unclipped polygon. */ |