diff options
Diffstat (limited to 'src/mesa/main/api_validate.c')
-rw-r--r-- | src/mesa/main/api_validate.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index a490189..d0b3ae7 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -710,6 +710,20 @@ valid_draw_indirect(struct gl_context *ctx, return GL_FALSE; } + /* From OpenGL ES 3.1 spec. section 10.5: + * "An INVALID_OPERATION error is generated if zero is bound to + * VERTEX_ARRAY_BINDING, DRAW_INDIRECT_BUFFER or to any enabled + * vertex array." + * + * Here we check that for each enabled vertex array we have a vertex + * buffer bound. + */ + if (_mesa_is_gles31(ctx) && + ctx->Array.VAO->_Enabled != ctx->Array.VAO->VertexAttribBufferMask) { + _mesa_error(ctx, GL_INVALID_OPERATION, "%s(No VBO bound)", name); + return GL_FALSE; + } + if (!_mesa_valid_prim_mode(ctx, mode, name)) return GL_FALSE; |