mesa: add KHR_no_error support to glDrawTransformFeedback*()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 19 Jul 2017 12:28:57 +0000 (14:28 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 31 Jul 2017 11:53:40 +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 809deb7..92f0472 100644 (file)
@@ -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 &&