From: Brian Paul Date: Wed, 5 Nov 2008 21:05:42 +0000 (-0700) Subject: gallium: added check for degenerate drawing calls X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=de14fdd63f26a2e6fc55fad92c08966f269601a6;p=mesa.git gallium: added check for degenerate drawing calls --- diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index ed3ae3e91a2..7cf06da43cc 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -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 */