summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/transformfeedback.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/transformfeedback.h')
-rw-r--r--src/mesa/main/transformfeedback.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/main/transformfeedback.h b/src/mesa/main/transformfeedback.h
index c83f917a532..475f5f14944 100644
--- a/src/mesa/main/transformfeedback.h
+++ b/src/mesa/main/transformfeedback.h
@@ -150,6 +150,26 @@ _mesa_set_transform_feedback_binding(struct gl_context *ctx,
bufObj->UsageHistory |= USAGE_TRANSFORM_FEEDBACK_BUFFER;
}
+static inline void
+_mesa_bind_buffer_range_xfb(struct gl_context *ctx,
+ struct gl_transform_feedback_object *obj,
+ GLuint index, struct gl_buffer_object *bufObj,
+ GLintptr offset, GLsizeiptr size)
+{
+ /* Note: no need to FLUSH_VERTICES or flag NewTransformFeedback, because
+ * transform feedback buffers can't be changed while transform feedback is
+ * active.
+ */
+
+ /* The general binding point */
+ _mesa_reference_buffer_object(ctx,
+ &ctx->TransformFeedback.CurrentBuffer,
+ bufObj);
+
+ /* The per-attribute binding point */
+ _mesa_set_transform_feedback_binding(ctx, obj, index, bufObj, offset, size);
+}
+
/*** GL_ARB_direct_state_access ***/
extern void GLAPIENTRY