_mesa_enum_to_string(mode), count,
_mesa_enum_to_string(type), indices);
- if (!_mesa_validate_DrawElements(ctx, mode, count, type, indices))
- return;
+ if (_mesa_is_no_error_enabled(ctx)) {
+ FLUSH_CURRENT(ctx, 0);
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+ } else {
+ if (!_mesa_validate_DrawElements(ctx, mode, count, type, indices))
+ return;
+ }
vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, ~0, ~0,
count, type, indices, 0, 1, 0);
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE & VERBOSE_DRAW)
- _mesa_debug(ctx, "glDrawElementsBaseVertex(%s, %d, %s, %p, %d)\n",
+ _mesa_debug(ctx, "glDrawElements(%s, %u, %s, %p)\n",
_mesa_enum_to_string(mode), count,
- _mesa_enum_to_string(type), indices, basevertex);
+ _mesa_enum_to_string(type), indices);
- if (!_mesa_validate_DrawElements(ctx, mode, count, type, indices))
- return;
+ if (_mesa_is_no_error_enabled(ctx)) {
+ FLUSH_CURRENT(ctx, 0);
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+ } else {
+ if (!_mesa_validate_DrawElements(ctx, mode, count, type, indices))
+ return;
+ }
vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, ~0, ~0,
count, type, indices, basevertex, 1, 0);
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE & VERBOSE_DRAW)
- _mesa_debug(ctx, "glDrawElementsInstanced(%s, %d, %s, %p, %d)\n",
+ _mesa_debug(ctx, "glDrawElements(%s, %u, %s, %p)\n",
_mesa_enum_to_string(mode), count,
- _mesa_enum_to_string(type), indices, numInstances);
+ _mesa_enum_to_string(type), indices);
- if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,
- numInstances))
- return;
+ if (_mesa_is_no_error_enabled(ctx)) {
+ FLUSH_CURRENT(ctx, 0);
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+ } else {
+ if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type,
+ indices, numInstances))
+ return;
+ }
vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, ~0, ~0,
count, type, indices, 0, numInstances, 0);
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx,
- "glDrawElementsInstancedBaseVertex(%s, %d, %s, %p, %d; %d)\n",
+ "glDrawElementsInstancedBaseVertex"
+ "(%s, %d, %s, %p, %d; %d)\n",
_mesa_enum_to_string(mode), count,
_mesa_enum_to_string(type), indices,
numInstances, basevertex);
- if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,
- numInstances))
- return;
+ if (_mesa_is_no_error_enabled(ctx)) {
+ FLUSH_CURRENT(ctx, 0);
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+ } else {
+ if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type,
+ indices, numInstances))
+ return;
+ }
vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, ~0, ~0,
count, type, indices,
_mesa_enum_to_string(type), indices,
numInstances, baseInstance);
- if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,
- numInstances))
- return;
+ if (_mesa_is_no_error_enabled(ctx)) {
+ FLUSH_CURRENT(ctx, 0);
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+ } else {
+ if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type,
+ indices, numInstances))
+ return;
+ }
vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, ~0, ~0,
count, type, indices, 0, numInstances,
_mesa_enum_to_string(type), indices,
numInstances, basevertex, baseInstance);
- if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,
- numInstances))
- return;
+ if (_mesa_is_no_error_enabled(ctx)) {
+ FLUSH_CURRENT(ctx, 0);
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+ } else {
+ if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type,
+ indices, numInstances))
+ return;
+ }
vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, ~0, ~0,
count, type, indices, basevertex,
_mesa_enum_to_string(mode),
_mesa_enum_to_string(type), indirect);
- if (!_mesa_validate_DrawElementsIndirect(ctx, mode, type, indirect))
- return;
+ if (_mesa_is_no_error_enabled(ctx)) {
+ FLUSH_CURRENT(ctx, 0);
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+ } else {
+ if (!_mesa_validate_DrawElementsIndirect(ctx, mode, type, indirect))
+ return;
+ }
if (skip_validated_draw(ctx))
return;