From: Timothy Arceri Date: Thu, 4 May 2017 03:31:27 +0000 (+1000) Subject: mesa: add KHR_no_error support for unmap buffer functions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bbae62c714b8e4b74ab8e4105ca5a6bff40ba5ce;p=mesa.git mesa: add KHR_no_error support for unmap buffer functions Reviewed-by: Eric Anholt --- diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index b147e7252e0..fe5a7e92143 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -115,7 +115,7 @@ - + diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 29e4ba43de6..a304ac0e4d9 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -5104,7 +5104,7 @@ - + diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 0fdb623b4b1..6fa32e90fda 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -2066,6 +2066,16 @@ validate_and_unmap_buffer(struct gl_context *ctx, return unmap_buffer(ctx, bufObj); } +GLboolean GLAPIENTRY +_mesa_UnmapBuffer_no_error(GLenum target) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object **bufObjPtr = get_buffer_target(ctx, target); + struct gl_buffer_object *bufObj = *bufObjPtr; + + return unmap_buffer(ctx, bufObj); +} + GLboolean GLAPIENTRY _mesa_UnmapBuffer(GLenum target) { @@ -2079,6 +2089,15 @@ _mesa_UnmapBuffer(GLenum target) return validate_and_unmap_buffer(ctx, bufObj, "glUnmapBuffer"); } +GLboolean GLAPIENTRY +_mesa_UnmapNamedBuffer_no_error(GLuint buffer) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); + + return unmap_buffer(ctx, bufObj); +} + GLboolean GLAPIENTRY _mesa_UnmapNamedBuffer(GLuint buffer) { diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h index 30e3105ff66..d538d0f2ca5 100644 --- a/src/mesa/main/bufferobj.h +++ b/src/mesa/main/bufferobj.h @@ -252,9 +252,13 @@ _mesa_ClearNamedBufferSubData(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const GLvoid *data); +GLboolean GLAPIENTRY +_mesa_UnmapBuffer_no_error(GLenum target); GLboolean GLAPIENTRY _mesa_UnmapBuffer(GLenum target); +GLboolean GLAPIENTRY +_mesa_UnmapNamedBuffer_no_error(GLuint buffer); GLboolean GLAPIENTRY _mesa_UnmapNamedBuffer(GLuint buffer);