diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_draw.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 3229e932484..e78d98f1e91 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -670,12 +670,13 @@ st_draw_vbo(GLcontext *ctx, } /* unreference buffers (frees wrapped user-space buffer objects) */ + for (attr = 0; attr < num_vbuffers; attr++) { + pipe_buffer_reference(pipe->screen, &vbuffer[attr].buffer, NULL); + assert(!vbuffer[attr].buffer); + } + if (userSpace) { - for (attr = 0; attr < num_vbuffers; attr++) { - pipe_buffer_reference(pipe->screen, &vbuffer[attr].buffer, NULL); - assert(!vbuffer[attr].buffer); - } pipe->set_vertex_buffers(pipe, 0, NULL); } } |