From: Oliver McFadden Date: Fri, 11 May 2007 19:44:35 +0000 (+0000) Subject: r300: Removed some checking in r300NumVerts that is not needed. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b39be3790a093e5b54974221478905b853cadb4;p=mesa.git r300: Removed some checking in r300NumVerts that is not needed. According to Aapo Tahkola the OpenGL specification defines the behaviour when there are not enough vertices for the primitive type, thus DRI drivers do not need to perform verification on the number of vertices per primitive. --- diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c index d49d218a8eb..5249aa2137d 100644 --- a/src/mesa/drivers/dri/r300/r300_render.c +++ b/src/mesa/drivers/dri/r300/r300_render.c @@ -172,20 +172,6 @@ static int r300NumVerts(r300ContextPtr rmesa, int num_verts, int prim) break; } - if (num_verts - verts_off == 0) { - WARN_ONCE - ("user error: Need more than %d vertices to draw primitive 0x%04x !\n", - num_verts, prim & PRIM_MODE_MASK); - return -1; - } - - if (verts_off > 0) { - WARN_ONCE - ("user error: %d is not a valid number of vertices for primitive 0x%04x !\n", - num_verts, prim & PRIM_MODE_MASK); - return -1; - } - return num_verts - verts_off; } @@ -259,7 +245,6 @@ static void r300EmitElts(GLcontext * ctx, void *elts, unsigned long n_elts, rvb->aos_offset = rmesa->radeon.radeonScreen->gart_texture_offset + rvb->start; - return; } else if (r300IsGartMemory(rmesa, elts, 1)) { WARN_ONCE("Pointer not within GART memory!\n");