From: Samuel Pitoiset Date: Wed, 19 Jul 2017 12:28:57 +0000 (+0200) Subject: mesa: add KHR_no_error support to glDrawTransformFeedback*() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c8ea79272355caf134bf2750cc3b1f408d97d106;p=mesa.git mesa: add KHR_no_error support to glDrawTransformFeedback*() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- 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 &&