gallium: added check for degenerate drawing calls
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 5 Nov 2008 21:05:42 +0000 (14:05 -0700)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 5 Nov 2008 21:05:42 +0000 (14:05 -0700)
src/mesa/state_tracker/st_draw.c

index ed3ae3e91a2d286ac47508686100d7d3d13235a9..7cf06da43cc5c6818cf28244e2b48c0da6e979dc 100644 (file)
@@ -584,6 +584,9 @@ st_draw_vbo(GLcontext *ctx,
    pipe->set_vertex_buffers(pipe, num_vbuffers, vbuffer);
    pipe->set_vertex_elements(pipe, num_velements, velements);
 
+   if (num_vbuffers == 0 || num_velements == 0)
+      return;
+
    /* do actual drawing */
    if (ib) {
       /* indexed primitive */