Since the ARB DSA function glUnmapNamedBuffer() is only exposed for 3.1 or above we make glUnmapNamedBuffer() an alias of glUnmapNamedBufferEXT() rather than the other way around. --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 2 +- src/mapi/glapi/gen/EXT_direct_state_access.xml | 5 +++++ src/mesa/main/bufferobj.c | 4 ++-- src/mesa/main/bufferobj.h | 4 ++-- src/mesa/main/tests/dispatch_sanity.cpp | 3 +-- 5 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index fa90ffcdd22..84ba14153d1 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 @@ <param name="access" type="GLbitfield" /> </function> - <function name="UnmapNamedBuffer" no_error="true"> + <function name="UnmapNamedBuffer" alias="UnmapNamedBufferEXT" no_error="true"> <return type="GLboolean" /> <param name="buffer" type="GLuint" /> </function> diff --git a/src/mapi/glapi/gen/EXT_direct_state_access.xml b/src/mapi/glapi/gen/EXT_direct_state_access.xml index 57b88c25060..b4087969816 100644 --- a/src/mapi/glapi/gen/EXT_direct_state_access.xml +++ b/src/mapi/glapi/gen/EXT_direct_state_access.xml @@ -154,6 +154,11 @@ <param name="data" type="const GLvoid *" /> </function> + <function name="UnmapNamedBufferEXT"> + <return type="GLboolean" /> + <param name="buffer" type="GLuint" /> + </function> + <!-- OpenGL 3.0 --> <function name="MapNamedBufferRangeEXT"> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 23f2f713815..45e9af21c5f 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -2681,7 +2681,7 @@ _mesa_UnmapBuffer(GLenum target) } GLboolean GLAPIENTRY -_mesa_UnmapNamedBuffer_no_error(GLuint buffer) +_mesa_UnmapNamedBufferEXT_no_error(GLuint buffer) { GET_CURRENT_CONTEXT(ctx); struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer); @@ -2690,7 +2690,7 @@ _mesa_UnmapNamedBuffer_no_error(GLuint buffer) } GLboolean GLAPIENTRY -_mesa_UnmapNamedBuffer(GLuint buffer) +_mesa_UnmapNamedBufferEXT(GLuint buffer) { GET_CURRENT_CONTEXT(ctx); struct gl_buffer_object *bufObj; diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h index c3b57ef7fe6..91df7e9c231 100644 --- a/src/mesa/main/bufferobj.h +++ b/src/mesa/main/bufferobj.h @@ -303,9 +303,9 @@ GLboolean GLAPIENTRY _mesa_UnmapBuffer(GLenum target); GLboolean GLAPIENTRY -_mesa_UnmapNamedBuffer_no_error(GLuint buffer); +_mesa_UnmapNamedBufferEXT_no_error(GLuint buffer); GLboolean GLAPIENTRY -_mesa_UnmapNamedBuffer(GLuint buffer); +_mesa_UnmapNamedBufferEXT(GLuint buffer); void GLAPIENTRY _mesa_GetBufferParameteriv(GLenum target, GLenum pname, GLint *params); diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index d91c3bcf813..8b0977731a7 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -932,7 +932,6 @@ const struct function common_desktop_functions_possible[] = { { "glClearNamedBufferSubData", 45, -1 }, { "glMapNamedBuffer", 45, -1 }, { "glMapNamedBufferRange", 45, -1 }, - { "glUnmapNamedBuffer", 45, -1 }, { "glFlushMappedNamedBufferRange", 45, -1 }, { "glGetNamedBufferParameteriv", 45, -1 }, { "glGetNamedBufferParameteri64v", 45, -1 }, @@ -1136,7 +1135,7 @@ const struct function common_desktop_functions_possible[] = { { "glNamedBufferDataEXT", 10, -1 }, { "glNamedBufferSubDataEXT", 10, -1 }, //{ "glMapNamedBufferEXT", 10, -1 }, - //{ "glUnmapNamedBufferEXT", 10, -1 }, + { "glUnmapNamedBufferEXT", 10, -1 }, //{ "glGetNamedBufferParameterivEXT", 10, -1 }, //{ "glGetNamedBufferPointervEXT", 10, -1 }, //{ "glGetNamedBufferSubDataEXT", 10, -1 }, -- 2.17.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev