Commit 2bcacc69 authored by Marta Löfstedt's avatar Marta Löfstedt Committed by Marta Lofstedt

mesa: Move sanity check of BindVertexBuffer for OpenGL ES 3.1

Sanity check of BindVertexBuffer for OpenGL ES in
_mesa_handle_bind_buffer_gen breaks OpenGL ES 2 conformance.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93426Signed-off-by: Marta Löfstedt's avatarMarta Lofstedt <marta.lofstedt@intel.com>
Reviewed-by: Tapani Pälli's avatarTapani Pälli <tapani.palli@intel.com>
parent d018619d
......@@ -953,7 +953,7 @@ _mesa_handle_bind_buffer_gen(struct gl_context *ctx,
{
struct gl_buffer_object *buf = *buf_handle;
if (!buf && (ctx->API == API_OPENGL_CORE || _mesa_is_gles31(ctx))) {
if (!buf && (ctx->API == API_OPENGL_CORE)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(non-gen name)", caller);
return false;
}
......
......@@ -1744,6 +1744,10 @@ vertex_array_vertex_buffer(struct gl_context *ctx,
} else if (buffer != 0) {
vbo = _mesa_lookup_bufferobj(ctx, buffer);
if (!vbo && _mesa_is_gles31(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(non-gen name)", func);
return;
}
/* From the GL_ARB_vertex_attrib_array spec:
*
* "[Core profile only:]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment