diff options
author | Keith Whitwell <[email protected]> | 2008-12-12 18:34:49 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-12-12 18:34:49 +0000 |
commit | 3a5d260cb1d2602b9fc32392f18538d0a6ff41c2 (patch) | |
tree | 6e74d85fbb90da294267c5f2d8c14760db7af6d2 /src | |
parent | 56f36ed16662f83e0cb29c2c08dce4ce0d3f4912 (diff) |
gallium: fix refcount bug introduced in eb20e2984
Diffstat (limited to 'src')
-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); } } |