diff options
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r-- | src/mesa/main/bufferobj.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 09ef233a835..674ff630cd6 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -1609,9 +1609,14 @@ inlined_buffer_storage(GLenum target, GLuint buffer, GLsizeiptr size, return; } } else { - bufObj = get_buffer(ctx, func, target, GL_INVALID_OPERATION); - if (!bufObj) - return; + if (no_error) { + struct gl_buffer_object **bufObjPtr = get_buffer_target(ctx, target); + bufObj = *bufObjPtr; + } else { + bufObj = get_buffer(ctx, func, target, GL_INVALID_OPERATION); + if (!bufObj) + return; + } } if (no_error || validate_buffer_storage(ctx, bufObj, size, flags, func)) @@ -1620,6 +1625,15 @@ inlined_buffer_storage(GLenum target, GLuint buffer, GLsizeiptr size, void GLAPIENTRY +_mesa_BufferStorage_no_error(GLenum target, GLsizeiptr size, + const GLvoid *data, GLbitfield flags) +{ + inlined_buffer_storage(target, 0, size, data, flags, false, true, + "glBufferStorage"); +} + + +void GLAPIENTRY _mesa_BufferStorage(GLenum target, GLsizeiptr size, const GLvoid *data, GLbitfield flags) { |