summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_draw.c9
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);
}
}