_mesa_debug(ctx, "glDrawArrays(%s, %d, %d)\n",
_mesa_lookup_enum_by_nr(mode), start, count);
+ FLUSH_CURRENT(ctx, 0);
+
if (!_mesa_validate_DrawArrays( ctx, mode, start, count ))
return;
- FLUSH_CURRENT( ctx, 0 );
-
if (0)
check_draw_arrays_data(ctx, start, count);
_mesa_debug(ctx, "glDrawArraysInstanced(%s, %d, %d, %d)\n",
_mesa_lookup_enum_by_nr(mode), start, count, numInstances);
+ FLUSH_CURRENT(ctx, 0);
+
if (!_mesa_validate_DrawArraysInstanced(ctx, mode, start, count, numInstances))
return;
- FLUSH_CURRENT( ctx, 0 );
-
if (0)
check_draw_arrays_data(ctx, start, count);
struct _mesa_index_buffer ib;
struct _mesa_prim prim[1];
- FLUSH_CURRENT( ctx, 0 );
-
vbo_bind_arrays(ctx);
ib.count = count;
_mesa_lookup_enum_by_nr(mode), start, end, count,
_mesa_lookup_enum_by_nr(type), indices, basevertex);
+ FLUSH_CURRENT(ctx, 0);
+
if (!_mesa_validate_DrawRangeElements( ctx, mode, start, end, count,
type, indices, basevertex ))
return;
_mesa_lookup_enum_by_nr(mode), count,
_mesa_lookup_enum_by_nr(type), indices);
+ FLUSH_CURRENT(ctx, 0);
+
if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices, 0 ))
return;
_mesa_lookup_enum_by_nr(mode), count,
_mesa_lookup_enum_by_nr(type), indices, basevertex);
+ FLUSH_CURRENT(ctx, 0);
+
if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices,
basevertex ))
return;
_mesa_lookup_enum_by_nr(mode), count,
_mesa_lookup_enum_by_nr(type), indices, numInstances);
+ FLUSH_CURRENT(ctx, 0);
+
if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,
numInstances, 0))
return;
_mesa_lookup_enum_by_nr(type), indices,
numInstances, basevertex);
+ FLUSH_CURRENT(ctx, 0);
+
if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,
numInstances, basevertex))
return;
if (primcount == 0)
return;
- FLUSH_CURRENT( ctx, 0 );
-
prim = calloc(1, primcount * sizeof(*prim));
if (prim == NULL) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glMultiDrawElements");
_mesa_debug(ctx, "glDrawTransformFeedback(%s, %d)\n",
_mesa_lookup_enum_by_nr(mode), name);
+ FLUSH_CURRENT(ctx, 0);
+
if (!_mesa_validate_DrawTransformFeedback(ctx, mode, obj)) {
return;
}
- FLUSH_CURRENT(ctx, 0);
-
vbo_draw_transform_feedback(ctx, mode, obj, 1);
}