Commit 91107b4c authored by Ian Romanick's avatar Ian Romanick

mesa: Require names from Gen in core context

Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
parent 843b876b
......@@ -720,6 +720,10 @@ bind_buffer_object(struct gl_context *ctx, GLenum target, GLuint buffer)
else {
/* non-default buffer object */
newBufObj = _mesa_lookup_bufferobj(ctx, buffer);
if (newBufObj == NULL && ctx->API == API_OPENGL_CORE) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glBindBuffer(non-gen name)");
return;
}
handle_bind_buffer_gen(ctx, target, buffer, &newBufObj);
}
......
......@@ -1216,6 +1216,11 @@ _mesa_BindTexture( GLenum target, GLuint texName )
}
}
else {
if (ctx->API == API_OPENGL_CORE) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glBindTexture");
return;
}
/* if this is a new texture id, allocate a texture object now */
newTexObj = ctx->Driver.NewTextureObject(ctx, texName, target);
if (!newTexObj) {
......
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