summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/api_validate.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index b35751e4668..6cb626a5805 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -45,6 +45,12 @@ check_valid_to_render(struct gl_context *ctx, const char *function)
return false;
}
+ if (!_mesa_all_buffers_are_unmapped(ctx->Array.VAO)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "%s(vertex buffers are mapped)", function);
+ return false;
+ }
+
switch (ctx->API) {
case API_OPENGLES2:
/* For ES2, we can draw if we have a vertex program/shader). */
@@ -119,12 +125,6 @@ check_valid_to_render(struct gl_context *ctx, const char *function)
unreachable("Invalid API value in check_valid_to_render()");
}
- if (!_mesa_all_buffers_are_unmapped(ctx->Array.VAO)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(vertex buffers are mapped)", function);
- return false;
- }
-
return true;
}