From: Samuel Pitoiset Date: Wed, 19 Jul 2017 08:21:09 +0000 (+0200) Subject: mesa: add KHR_no_error support to glMultiDrawArrays() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d21ae02fb227ed80f27417ac3fc0b83e491e8c01;p=mesa.git mesa: add KHR_no_error support to glMultiDrawArrays() 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 98abf47bd3a..809deb71303 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -733,8 +733,15 @@ vbo_exec_MultiDrawArrays(GLenum mode, const GLint *first, "glMultiDrawArrays(%s, %p, %p, %d)\n", _mesa_enum_to_string(mode), first, count, primcount); - if (!_mesa_validate_MultiDrawArrays(ctx, mode, count, primcount)) - return; + if (_mesa_is_no_error_enabled(ctx)) { + FLUSH_CURRENT(ctx, 0); + + if (ctx->NewState) + _mesa_update_state(ctx); + } else { + if (!_mesa_validate_MultiDrawArrays(ctx, mode, count, primcount)) + return; + } for (i = 0; i < primcount; i++) { if (count[i] > 0) {