diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/transformfeedback.h | 20 |
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 |