From: Marek Olšák Date: Fri, 3 Sep 2010 19:43:36 +0000 (+0200) Subject: r300g: skip draw calls with no vertex elements, fixing hardlocks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d3ca8a4eddcecced82a41201cf59a732f0b8e18b;p=mesa.git r300g: skip draw calls with no vertex elements, fixing hardlocks --- diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index 20bad2c56f5..50c6ef37b90 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -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;