mesa: add KHR_no_error support to glMultiDrawElementsBaseVertex()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 18 Jul 2017 13:13:44 +0000 (15:13 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 31 Jul 2017 11:53:39 +0000 (13:53 +0200)
Just skip validation when no_error is enabled.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/vbo/vbo_exec_array.c

index 4f86d19..dfb8402 100644 (file)
@@ -1408,9 +1408,16 @@ vbo_exec_MultiDrawElementsBaseVertex(GLenum mode,
 {
    GET_CURRENT_CONTEXT(ctx);
 
-   if (!_mesa_validate_MultiDrawElements(ctx, mode, count, type, indices,
-                                         primcount))
-      return;
+   if (_mesa_is_no_error_enabled(ctx)) {
+      FLUSH_CURRENT(ctx, 0);
+
+      if (ctx->NewState)
+         _mesa_update_state(ctx);
+   } else {
+      if (!_mesa_validate_MultiDrawElements(ctx, mode, count, type, indices,
+                                            primcount))
+         return;
+   }
 
    if (skip_validated_draw(ctx))
       return;