From 7a8affb6a1c1cc4d6de10717b1c3c8d64a8e41f2 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 13 Nov 2012 15:44:46 +0100 Subject: r300g: fix crash since the set_vertex_buffers(start_slot) change --- src/gallium/drivers/r300/r300_state.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 85d05bd2ce3..e5e68d22dd0 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1632,16 +1632,17 @@ static void r300_set_vertex_buffers_hwtcl(struct pipe_context* pipe, { struct r300_context* r300 = r300_context(pipe); - /* There must be at least one vertex buffer set, otherwise it locks up. */ - if (!count) { - buffers = &r300->dummy_vb; - count = 1; - } - util_set_vertex_buffers_count(r300->vertex_buffer, &r300->nr_vertex_buffers, buffers, start_slot, count); + /* There must be at least one vertex buffer set, otherwise it locks up. */ + if (!r300->nr_vertex_buffers) { + util_set_vertex_buffers_count(r300->vertex_buffer, + &r300->nr_vertex_buffers, + &r300->dummy_vb, 0, 1); + } + r300->vertex_arrays_dirty = TRUE; } -- cgit v1.2.3