summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-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;
}