if (stride == 0)
stride = 4 * sizeof(GLuint); /* sizeof(DrawArraysIndirectCommand) */
- if (!_mesa_validate_MultiDrawArraysIndirect(ctx, mode, indirect,
- primcount, stride))
- return;
+ if (_mesa_is_no_error_enabled(ctx)) {
+ FLUSH_CURRENT(ctx, 0);
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+ } else {
+ if (!_mesa_validate_MultiDrawArraysIndirect(ctx, mode, indirect,
+ primcount, stride))
+ return;
+ }
if (skip_validated_draw(ctx))
return;
if (stride == 0)
stride = 5 * sizeof(GLuint); /* sizeof(DrawElementsIndirectCommand) */
- if (!_mesa_validate_MultiDrawElementsIndirect(ctx, mode, type, indirect,
- primcount, stride))
- return;
+ if (_mesa_is_no_error_enabled(ctx)) {
+ FLUSH_CURRENT(ctx, 0);
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+ } else {
+ if (!_mesa_validate_MultiDrawElementsIndirect(ctx, mode, type, indirect,
+ primcount, stride))
+ return;
+ }
if (skip_validated_draw(ctx))
return;
if (stride == 0)
stride = 4 * sizeof(GLuint); /* sizeof(DrawArraysIndirectCommand) */
- if (!_mesa_validate_MultiDrawArraysIndirectCount(ctx, mode,
- indirect, drawcount,
- maxdrawcount, stride))
- return;
+ if (_mesa_is_no_error_enabled(ctx)) {
+ FLUSH_CURRENT(ctx, 0);
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+ } else {
+ if (!_mesa_validate_MultiDrawArraysIndirectCount(ctx, mode,
+ indirect, drawcount,
+ maxdrawcount, stride))
+ return;
+ }
if (skip_validated_draw(ctx))
return;
if (stride == 0)
stride = 5 * sizeof(GLuint); /* sizeof(DrawElementsIndirectCommand) */
- if (!_mesa_validate_MultiDrawElementsIndirectCount(ctx, mode, type,
- indirect, drawcount,
- maxdrawcount, stride))
- return;
+ if (_mesa_is_no_error_enabled(ctx)) {
+ FLUSH_CURRENT(ctx, 0);
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+ } else {
+ if (!_mesa_validate_MultiDrawElementsIndirectCount(ctx, mode, type,
+ indirect, drawcount,
+ maxdrawcount, stride))
+ return;
+ }
if (skip_validated_draw(ctx))
return;