summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-11-05 14:05:42 -0700
committerBrian Paul <[email protected]>2008-11-05 14:05:42 -0700
commitde14fdd63f26a2e6fc55fad92c08966f269601a6 (patch)
tree3e4553e3b5b33e628536d20b67e52833a26ea3b4 /src/mesa/state_tracker
parent6282c38283ea81af1d950dbc1f82a6950e8350ae (diff)
gallium: added check for degenerate drawing calls
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_draw.c3
1 files changed, 3 insertions, 0 deletions
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 */