From c8ea79272355caf134bf2750cc3b1f408d97d106 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 19 Jul 2017 14:28:57 +0200 Subject: mesa: add KHR_no_error support to glDrawTransformFeedback*() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- src/mesa/vbo/vbo_exec_array.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 809deb71303..92f04726c70 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -1442,9 +1442,16 @@ vbo_draw_transform_feedback(struct gl_context *ctx, GLenum mode, struct vbo_context *vbo = vbo_context(ctx); struct _mesa_prim prim; - if (!_mesa_validate_DrawTransformFeedback(ctx, mode, obj, stream, - numInstances)) { - return; + if (_mesa_is_no_error_enabled(ctx)) { + FLUSH_CURRENT(ctx, 0); + + if (ctx->NewState) + _mesa_update_state(ctx); + } else { + if (!_mesa_validate_DrawTransformFeedback(ctx, mode, obj, stream, + numInstances)) { + return; + } } if (ctx->Driver.GetTransformFeedbackVertexCount && -- cgit v1.2.3