diff options
author | Ian Romanick <[email protected]> | 2012-08-17 17:14:02 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-08-29 15:09:37 -0700 |
commit | 91107b4ccf7a47633fce98b9ccfba7f559098cb7 (patch) | |
tree | 083698696151e064d13c77a8e810b649af0d7ae3 /src/mesa/main/bufferobj.c | |
parent | 843b876ba3e01af73ea4ca55a529911448c10b2a (diff) |
mesa: Require names from Gen in core context
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r-- | src/mesa/main/bufferobj.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index f8938a51054..728cc51da4f 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -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); } |