summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bufferobj.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-05-22 15:47:00 +1000
committerTimothy Arceri <[email protected]>2017-05-30 08:03:32 +1000
commit3eb6d34dfc2c796174be15848f2d4fada2e01063 (patch)
treeb0dfd711cb35c4cc106c278f24daf0f30406d2ea /src/mesa/main/bufferobj.c
parent863b19ae213d2c8b147b436b197918d6e6af7a0e (diff)
mesa: convert mesa_bind_buffer_range_transform_feedback() to a validate function
This allows some tidy up and also makes it so we can add KHR_no_error support. Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r--src/mesa/main/bufferobj.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index aa253ef9819..2d3e0f2602c 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -4029,10 +4029,14 @@ _mesa_BindBufferRange(GLenum target, GLuint index,
switch (target) {
case GL_TRANSFORM_FEEDBACK_BUFFER:
- _mesa_bind_buffer_range_transform_feedback(ctx,
- ctx->TransformFeedback.CurrentObject,
- index, bufObj, offset, size,
- false);
+ if (!_mesa_validate_buffer_range_xfb(ctx,
+ ctx->TransformFeedback.CurrentObject,
+ index, bufObj, offset, size,
+ false))
+ return;
+
+ _mesa_bind_buffer_range_xfb(ctx, ctx->TransformFeedback.CurrentObject,
+ index, bufObj, offset, size);
return;
case GL_UNIFORM_BUFFER:
bind_buffer_range_uniform_buffer_err(ctx, index, bufObj, offset, size);