mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
mesa: Generate GL_INVALID_OPERATION when drawing w/o a VAO in core profile
GL 3-ish versions of the spec are less clear that an error should be
generated here, so Ken (and I during review) just missed it in 1afe335.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
4e6244e80f
commit
b93dcb0e71
1 changed files with 9 additions and 1 deletions
|
|
@ -79,8 +79,16 @@ check_valid_to_render(struct gl_context *ctx, const char *function)
|
|||
break;
|
||||
|
||||
case API_OPENGL_CORE:
|
||||
if (ctx->Array.VAO == ctx->Array.DefaultVAO)
|
||||
/* Section 10.4 (Drawing Commands Using Vertex Arrays) of the OpenGL 4.5
|
||||
* Core Profile spec says:
|
||||
*
|
||||
* "An INVALID_OPERATION error is generated if no vertex array
|
||||
* object is bound (see section 10.3.1)."
|
||||
*/
|
||||
if (ctx->Array.VAO == ctx->Array.DefaultVAO) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(no VAO bound)", function);
|
||||
return GL_FALSE;
|
||||
}
|
||||
/* fallthrough */
|
||||
case API_OPENGL_COMPAT:
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue