From d3ca8a4eddcecced82a41201cf59a732f0b8e18b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 3 Sep 2010 21:43:36 +0200 Subject: [PATCH] r300g: skip draw calls with no vertex elements, fixing hardlocks --- src/gallium/drivers/r300/r300_render.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.30.2