summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-03-01 07:20:16 -0700
committerBrian Paul <[email protected]>2012-03-01 08:55:24 -0700
commit0605c6d861d0e59baadf725f3530319b32b2a344 (patch)
tree8141de4ab6bda96b71644230df6a830b2b0e5330 /src/mesa
parentc14c84f383309ee0fdf007c0d3e968c38f3af86e (diff)
Revert "st/mesa: don't unreference user attribs up front."
This reverts commit 72931ca4b9fb1002f5b62b74f7f7f32e94e80fde. This commit caused a few piglit regressions (quad-invariance, draw-batch, etc) with the vmware svga driver.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_draw.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index e4bc36ed5f8..eb187519ffe 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -905,7 +905,6 @@ st_validate_varrays(struct gl_context *ctx,
unsigned num_vbuffers, num_velements;
GLuint attr;
unsigned i;
- unsigned old_num_user_attribs;
/* must get these after state validation! */
vp = st->vp;
@@ -914,7 +913,9 @@ st_validate_varrays(struct gl_context *ctx,
memset(velements, 0, sizeof(struct pipe_vertex_element) * vpv->num_inputs);
/* Unreference any user vertex buffers. */
- old_num_user_attribs = st->num_user_attribs;
+ for (i = 0; i < st->num_user_attribs; i++) {
+ pipe_resource_reference(&st->user_attrib[i].buffer, NULL);
+ }
st->num_user_attribs = 0;
/*
@@ -953,10 +954,6 @@ st_validate_varrays(struct gl_context *ctx,
assert(!vbuffer[attr].buffer);
}
- for (i = old_num_user_attribs; i < st->num_user_attribs; i++) {
- pipe_resource_reference(&st->user_attrib[i].buffer, NULL);
- }
-
return GL_TRUE;
}