From de14fdd63f26a2e6fc55fad92c08966f269601a6 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 5 Nov 2008 14:05:42 -0700 Subject: [PATCH] gallium: added check for degenerate drawing calls --- src/mesa/state_tracker/st_draw.c | 3 +++ 1 file changed, 3 insertions(+) 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 */ -- 2.30.2