summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_render.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-09-03 21:43:36 +0200
committerMarek Olšák <maraeo@gmail.com>2010-09-04 18:56:22 +0200
commitd3ca8a4eddcecced82a41201cf59a732f0b8e18b (patch)
treed73a07d3a65689cd8451b1117d8fdc34ea6b77be /src/gallium/drivers/r300/r300_render.c
parentd774b0c710bb7d833d17bd12f5151a0176baad96 (diff)
r300g: skip draw calls with no vertex elements, fixing hardlocks
Diffstat (limited to 'src/gallium/drivers/r300/r300_render.c')
-rw-r--r--src/gallium/drivers/r300/r300_render.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index 20bad2c56f..50c6ef37b9 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;