nouveau : implement nv10_render_points

This commit is contained in:
Matthieu Castet
2007-09-16 23:01:56 +02:00
parent 2616b20689
commit 7356dac1b6
+28 -1
View File
@@ -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)