diff options
author | Matthieu Castet <[email protected]> | 2007-09-16 23:01:56 +0200 |
---|---|---|
committer | Matthieu Castet <[email protected]> | 2007-09-16 23:01:56 +0200 |
commit | 7356dac1b69ca76706439bb7c51ef37fee6588a2 (patch) | |
tree | 568f545782a05660478ac0960440578b3964d091 /src/mesa | |
parent | 2616b206895d0e4e3ba1a5b981708ce3d37670ef (diff) |
nouveau : implement nv10_render_points
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv10_swtcl.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c index 4172afbb16c..14c1351aa11 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_swtcl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_swtcl.c @@ -332,9 +332,36 @@ do { \ nmesa->vertex_attr_count++; \ } while (0) +static inline void nv10_render_point(GLcontext *ctx, GLubyte *vertptr) +{ + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + GLuint vertsize = nmesa->vertex_size / 4; + GLuint size_dword = vertsize; + + nv10ExtendPrimitive(nmesa, size_dword); + nv10StartPrimitive(nmesa,GL_POINTS+1,size_dword); + OUT_RING_VERT(nmesa, (nouveauVertex*)(vertptr),vertsize); + nv10FinishPrimitive(nmesa); +} + static inline void nv10_render_points(GLcontext *ctx,GLuint first,GLuint last) { - WARN_ONCE("Unimplemented\n"); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx); + uint32_t *vertptr = (GLubyte *)nmesa->verts; + GLuint vertsize = nmesa->vertex_size / 4; + GLuint i; + + if (VB->Elts) { + for (i = first; i < last; i++) + if (VB->ClipMask[VB->Elts[i]] == 0) + nv10_render_point(ctx, vertptr + (VB->Elts[i]*vertsize)); + } + else { + for (i = first; i < last; i++) + if (VB->ClipMask[i] == 0) + nv10_render_point(ctx, vertptr + (i*vertsize)); + } } static inline void nv10_render_line(GLcontext *ctx,GLuint v1,GLuint v2) |