aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/api_validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/api_validate.c')
-rw-r--r--mesalib/src/mesa/main/api_validate.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mesalib/src/mesa/main/api_validate.c b/mesalib/src/mesa/main/api_validate.c
index 1ae491f25..4e94f47e3 100644
--- a/mesalib/src/mesa/main/api_validate.c
+++ b/mesalib/src/mesa/main/api_validate.c
@@ -383,6 +383,12 @@ _mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint fi
return GL_FALSE;
}
+ if (first < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glDrawArraysInstanced(start=%d)", first);
+ return GL_FALSE;
+ }
+
if (!_mesa_valid_prim_mode(ctx, mode)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glDrawArraysInstanced(mode=0x%x)", mode);
@@ -399,12 +405,6 @@ _mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint fi
if (!check_valid_to_render(ctx, "glDrawArraysInstanced(invalid to render)"))
return GL_FALSE;
- if (ctx->CompileFlag) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glDrawArraysInstanced(display list");
- return GL_FALSE;
- }
-
if (ctx->Const.CheckArrayBounds) {
if (first + count > (GLint) ctx->Array.ArrayObj->_MaxElement)
return GL_FALSE;