diff options
-rw-r--r-- | src/mapi/glapi/gen/gl_API.xml | 2 | ||||
-rw-r--r-- | src/mesa/main/bufferobj.c | 20 | ||||
-rw-r--r-- | src/mesa/main/bufferobj.h | 3 |
3 files changed, 21 insertions, 4 deletions
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 1a3b306c03c..8afd5ec5138 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -8262,7 +8262,7 @@ <enum name="BUFFER_STORAGE_FLAGS" value="0x8220" /> <enum name="CLIENT_MAPPED_BUFFER_BARRIER_BIT" value="0x4000" /> - <function name="BufferStorage"> + <function name="BufferStorage" no_error="true"> <param name="target" type="GLenum"/> <param name="size" type="GLsizeiptr"/> <param name="data" type="const GLvoid *"/> 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) { diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h index a06a0e470bd..024d07daaf8 100644 --- a/src/mesa/main/bufferobj.h +++ b/src/mesa/main/bufferobj.h @@ -172,6 +172,9 @@ GLboolean GLAPIENTRY _mesa_IsBuffer(GLuint buffer); void GLAPIENTRY +_mesa_BufferStorage_no_error(GLenum target, GLsizeiptr size, + const GLvoid *data, GLbitfield flags); +void GLAPIENTRY _mesa_BufferStorage(GLenum target, GLsizeiptr size, const GLvoid *data, GLbitfield flags); |