[Mesa-dev] [PATCH 048/101] mesa: add KHR_no_error support to glMultiDrawArrays()

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Jul 21 17:39:57 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 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 98abf47bd3..809deb7130 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.13.3



More information about the mesa-dev mailing list