From d21ae02fb227ed80f27417ac3fc0b83e491e8c01 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 19 Jul 2017 10:21:09 +0200 Subject: [PATCH] mesa: add KHR_no_error support to glMultiDrawArrays() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- src/mesa/vbo/vbo_exec_array.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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) { -- 2.30.2