From: Vladimir Dergachev Date: Thu, 30 Dec 2004 20:24:30 +0000 (+0000) Subject: Rework slightly r300_get_primitive_type - make it clearer and more compact.. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=24b5e4914138a31599f55e1059ef3e34063a5917;p=mesa.git Rework slightly r300_get_primitive_type - make it clearer and more compact.. --- diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c index 1cb99915ff7..aaf1b8819a4 100644 --- a/src/mesa/drivers/dri/r300/r300_render.c +++ b/src/mesa/drivers/dri/r300/r300_render.c @@ -72,81 +72,69 @@ static int r300_get_primitive_type(r300ContextPtr rmesa, TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &tnl->vb; GLuint i; - int type=-1; + int type=-1, min_vertices=0; + char *name="UNKNOWN"; if(end<=start)return -1; /* do we need to watch for this ? */ - fprintf(stderr, "[%d-%d]", start, end); switch (prim & PRIM_MODE_MASK) { - case GL_LINES: - fprintf(stderr, "L "); + case GL_POINTS: + name="P"; + type=R300_VAP_VF_CNTL__PRIM_POINTS; + min_vertices=1; + break; + case GL_LINES: + name="L"; type=R300_VAP_VF_CNTL__PRIM_LINES; - if(end=end){ + fprintf(stderr, "Not enough vertices\n"); + return -1; + } return type; }