aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_draw_feedback.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-02-10 07:28:40 +0000
committermarha <marha@users.sourceforge.net>2011-02-10 07:28:40 +0000
commit2eccc8cdcbff8a71ee25bac7cd71ef4f40564285 (patch)
tree58fd671ace1ab27a8e71de1b66c2f4da3c2222c0 /mesalib/src/mesa/state_tracker/st_draw_feedback.c
parent744bc6a5e71f207a33b0826598c1f93302f7fe01 (diff)
parent183968dd18dc91f73325980bd511ed6bdb38b432 (diff)
downloadvcxsrv-2eccc8cdcbff8a71ee25bac7cd71ef4f40564285.tar.gz
vcxsrv-2eccc8cdcbff8a71ee25bac7cd71ef4f40564285.tar.bz2
vcxsrv-2eccc8cdcbff8a71ee25bac7cd71ef4f40564285.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_draw_feedback.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_draw_feedback.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_draw_feedback.c b/mesalib/src/mesa/state_tracker/st_draw_feedback.c
index b694be04f..2ecb8e202 100644
--- a/mesalib/src/mesa/state_tracker/st_draw_feedback.c
+++ b/mesalib/src/mesa/state_tracker/st_draw_feedback.c
@@ -220,7 +220,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
break;
default:
assert(0);
- return;
+ goto out_unref_vertex;
}
if (bufobj && bufobj->Name) {
@@ -256,15 +256,6 @@ st_feedback_draw_vbo(struct gl_context *ctx,
/*
* unmap vertex/index buffers
*/
- for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
- if (draw->pt.vertex_buffer[i].buffer) {
- pipe_buffer_unmap(pipe, vb_transfer[i]);
- pipe_resource_reference(&draw->pt.vertex_buffer[i].buffer, NULL);
- draw_set_mapped_vertex_buffer(draw, i, NULL);
- pipe_resource_reference(&vbuffers[i].buffer, NULL);
- }
- }
-
if (ib) {
draw_set_mapped_index_buffer(draw, NULL);
draw_set_index_buffer(draw, NULL);
@@ -273,6 +264,14 @@ st_feedback_draw_vbo(struct gl_context *ctx,
pipe_buffer_unmap(pipe, ib_transfer);
pipe_resource_reference(&ibuffer.buffer, NULL);
}
+
+ out_unref_vertex:
+ for (attr = 0; attr < vp->num_inputs; attr++) {
+ pipe_buffer_unmap(pipe, vb_transfer[attr]);
+ draw_set_mapped_vertex_buffer(draw, attr, NULL);
+ pipe_resource_reference(&vbuffers[attr].buffer, NULL);
+ }
+ draw_set_vertex_buffers(draw, 0, NULL);
}
#endif /* FEATURE_feedback || FEATURE_rastpos */