From 9739cc480633b970eea2e320159db99468a5c82c Mon Sep 17 00:00:00 2001 From: Marta Lofstedt Date: Fri, 18 Dec 2015 12:51:55 +0100 Subject: [PATCH] mesa: Move testing of BindVertexBuffer to Varray --- src/mesa/main/bufferobj.c | 5 ----- src/mesa/main/varray.c | 4 +++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 7f42673..00ae883 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -943,11 +943,6 @@ _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))) { - _mesa_error(ctx, GL_INVALID_OPERATION, "%s(non-gen name)", caller); - return false; - } - if (!buf || buf == &DummyBufferObject) { /* If this is a new buffer object id, or one which was generated but * never used before, allocate a buffer object now. diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index c71e16a..2d07716 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -1754,8 +1754,10 @@ vertex_array_vertex_buffer(struct gl_context *ctx, * Otherwise, we fall back to the same compat profile behavior as other * object references (automatically gen it). */ - if (!_mesa_handle_bind_buffer_gen(ctx, buffer, &vbo, func)) + if (!vbo && (ctx->API == API_OPENGL_CORE || _mesa_is_gles31(ctx))) { + _mesa_error(ctx, GL_INVALID_OPERATION, "%s(non-gen name)", func); return; + } } else { /* The ARB_vertex_attrib_binding spec says: * -- 2.1.4