aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-11-13 15:44:46 +0100
committerMarek Olšák <[email protected]>2012-11-13 15:53:16 +0100
commit7a8affb6a1c1cc4d6de10717b1c3c8d64a8e41f2 (patch)
treee080eafcc3f9a42dc7e296b0c6269dd80c155d79
parentd4780fddb158ad83c45b565a7ace008639520fb2 (diff)
r300g: fix crash since the set_vertex_buffers(start_slot) change
-rw-r--r--src/gallium/drivers/r300/r300_state.c13
1 files changed, 7 insertions, 6 deletions
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;
}