r300g: skip draw calls with no vertex elements, fixing hardlocks
authorMarek Olšák <maraeo@gmail.com>
Fri, 3 Sep 2010 19:43:36 +0000 (21:43 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sat, 4 Sep 2010 16:56:22 +0000 (18:56 +0200)
src/gallium/drivers/r300/r300_render.c

index 20bad2c56f55029e3f3534447c12238222fd84a5..50c6ef37b90f5e43d472785d962357ea9cf0f1a4 100644 (file)
@@ -617,6 +617,9 @@ static void r300_draw_vbo(struct pipe_context* pipe,
 {
     struct r300_context* r300 = r300_context(pipe);
 
+    if (!r300->velems->count || !r300->vertex_buffer_count)
+           return;
+
     if (info->indexed && r300->index_buffer.buffer) {
         unsigned offset;