mesa: add KHR_no_error support to glMultiDrawArrays()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 19 Jul 2017 08:21:09 +0000 (10:21 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 31 Jul 2017 11:53:39 +0000 (13:53 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/vbo/vbo_exec_array.c

index 98abf47bd3add469707cb49c2682674e8ac23fb0..809deb71303091f1a79bb0365b6d47cceb0ea955 100644 (file)
@@ -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) {