GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices)
{
- FLUSH_CURRENT(ctx, 0);
-
return validate_DrawElements_common(ctx, mode, count, type, indices,
"glDrawElements");
}
{
GLsizei i;
- FLUSH_CURRENT(ctx, 0);
-
/*
* Section 2.3.1 (Errors) of the OpenGL 4.5 (Core Profile) spec says:
*
GLsizei count, GLenum type,
const GLvoid *indices)
{
- FLUSH_CURRENT(ctx, 0);
-
if (end < start) {
_mesa_error(ctx, GL_INVALID_VALUE, "glDrawRangeElements(end<start)");
return GL_FALSE;
validate_draw_arrays(struct gl_context *ctx, const char *func,
GLenum mode, GLsizei count, GLsizei numInstances)
{
- FLUSH_CURRENT(ctx, 0);
-
if (count < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s(count)", func);
return false;
{
int i;
- FLUSH_CURRENT(ctx, 0);
-
if (!_mesa_valid_prim_mode(ctx, mode, "glMultiDrawArrays"))
return false;
GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices, GLsizei numInstances)
{
- FLUSH_CURRENT(ctx, 0);
-
if (numInstances < 0) {
_mesa_error(ctx, GL_INVALID_VALUE,
"glDrawElementsInstanced(numInstances=%d)", numInstances);
GLuint stream,
GLsizei numInstances)
{
- FLUSH_CURRENT(ctx, 0);
-
if (!_mesa_valid_prim_mode(ctx, mode, "glDrawTransformFeedback*(mode)")) {
return GL_FALSE;
}
{
const unsigned drawArraysNumParams = 4;
- FLUSH_CURRENT(ctx, 0);
-
return valid_draw_indirect(ctx, mode,
indirect, drawArraysNumParams * sizeof(GLuint),
"glDrawArraysIndirect");
{
const unsigned drawElementsNumParams = 5;
- FLUSH_CURRENT(ctx, 0);
-
return valid_draw_indirect_elements(ctx, mode, type,
indirect, drawElementsNumParams * sizeof(GLuint),
"glDrawElementsIndirect");
GLsizeiptr size = 0;
const unsigned drawArraysNumParams = 4;
- FLUSH_CURRENT(ctx, 0);
-
/* caller has converted stride==0 to drawArraysNumParams * sizeof(GLuint) */
assert(stride != 0);
GLsizeiptr size = 0;
const unsigned drawElementsNumParams = 5;
- FLUSH_CURRENT(ctx, 0);
-
/* caller has converted stride==0 to drawElementsNumParams * sizeof(GLuint) */
assert(stride != 0);
GLsizeiptr size = 0;
const unsigned drawArraysNumParams = 4;
- FLUSH_CURRENT(ctx, 0);
-
/* caller has converted stride==0 to drawArraysNumParams * sizeof(GLuint) */
assert(stride != 0);
GLsizeiptr size = 0;
const unsigned drawElementsNumParams = 5;
- FLUSH_CURRENT(ctx, 0);
-
/* caller has converted stride==0 to drawElementsNumParams * sizeof(GLuint) */
assert(stride != 0);
_mesa_debug(ctx, "glDrawArrays(%s, %d, %d)\n",
_mesa_enum_to_string(mode), start, count);
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
_mesa_debug(ctx, "glDrawArraysInstanced(%s, %d, %d, %d)\n",
_mesa_enum_to_string(mode), start, count, numInstances);
+ FLUSH_FOR_DRAW(ctx);
if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
-
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
_mesa_enum_to_string(mode), first, count,
numInstances, baseInstance);
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
"glMultiDrawArrays(%s, %p, %p, %d)\n",
_mesa_enum_to_string(mode), first, count, primcount);
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
_mesa_enum_to_string(mode), start, end, count,
_mesa_enum_to_string(type), indices, basevertex);
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
_mesa_enum_to_string(mode), count,
_mesa_enum_to_string(type), indices);
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
_mesa_enum_to_string(mode), count,
_mesa_enum_to_string(type), indices);
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
_mesa_enum_to_string(mode), count,
_mesa_enum_to_string(type), indices);
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
_mesa_enum_to_string(type), indices,
numInstances, basevertex);
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
_mesa_enum_to_string(type), indices,
numInstances, baseInstance);
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
_mesa_enum_to_string(type), indices,
numInstances, basevertex, baseInstance);
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
{
GET_CURRENT_CONTEXT(ctx);
+ FLUSH_FOR_DRAW(ctx);
+
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (!_mesa_validate_MultiDrawElements(ctx, mode, count, type, indices,
{
GET_CURRENT_CONTEXT(ctx);
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
{
struct _mesa_prim prim;
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
_mesa_debug(ctx, "glDrawArraysIndirect(%s, %p)\n",
_mesa_enum_to_string(mode), indirect);
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
_mesa_enum_to_string(mode),
_mesa_enum_to_string(type), indirect);
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
if (stride == 0)
stride = 4 * sizeof(GLuint); /* sizeof(DrawArraysIndirectCommand) */
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
if (stride == 0)
stride = 5 * sizeof(GLuint); /* sizeof(DrawElementsIndirectCommand) */
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
if (stride == 0)
stride = 4 * sizeof(GLuint); /* sizeof(DrawArraysIndirectCommand) */
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)
if (stride == 0)
stride = 5 * sizeof(GLuint); /* sizeof(DrawElementsIndirectCommand) */
- if (_mesa_is_no_error_enabled(ctx)) {
- FLUSH_CURRENT(ctx, 0);
+ FLUSH_FOR_DRAW(ctx);
+ if (_mesa_is_no_error_enabled(ctx)) {
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
if (ctx->NewState)