This can happen when any of our vertex buffers was written by a previous
transform feedback draw.
Fixes the following piglit tests:
spec/ext_transform_feedback/position-render-bufferbase
spec/ext_transform_feedback/position-render-bufferbase-discard
spec/ext_transform_feedback/position-render-bufferoffset
spec/ext_transform_feedback/position-render-bufferoffset-discard
spec/ext_transform_feedback/position-render-bufferrange
spec/ext_transform_feedback/position-render-bufferrange-discard
Reviewed-by: Eric Anholt <eric@anholt.net>
v3d_flush_jobs_writing_resource(v3d, view->base.resource);
}
+
+ /* Flush writes to our vertex buffers (i.e. from transform feedback) */
+ if (s == PIPE_SHADER_VERTEX) {
+ foreach_bit(i, v3d->vertexbuf.enabled_mask) {
+ struct pipe_vertex_buffer *vb = &v3d->vertexbuf.vb[i];
+
+ v3d_flush_jobs_writing_resource(v3d, vb->buffer.resource);
+ }
+ }
}
static void