diff options
author | Oliver McFadden <[email protected]> | 2007-05-09 22:06:19 +0000 |
---|---|---|
committer | Oliver McFadden <[email protected]> | 2007-05-09 22:43:01 +0000 |
commit | 795ebb1a3b5b486e8668086137decfc6ed2a7df5 (patch) | |
tree | 99ba9646b490e6f6de55cf53a7ec6c0f911596b0 | |
parent | d0be8b959adae87b920b185fbe4efe6f981837fd (diff) |
r300: Probably a good idea to always check the vertices; it's a WARN_ONCE so the
performance impact is extremely minimal.
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_render.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c index fee29878f6d..1ecddf69c15 100644 --- a/src/mesa/drivers/dri/r300/r300_render.c +++ b/src/mesa/drivers/dri/r300/r300_render.c @@ -169,23 +169,22 @@ static int r300NumVerts(r300ContextPtr rmesa, int num_verts, int prim) fprintf(stderr, "%s:%s Do not know how to handle primitive 0x%04x - help me !\n", __FILE__, __FUNCTION__, prim & PRIM_MODE_MASK); - return -1; + return 0; break; } - if (RADEON_DEBUG & DEBUG_VERTS) { - 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 0; - } + 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 0; + } - 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); - } + 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 0; } return num_verts - verts_off; |