mesa: add support for glUnmapNamedBufferEXT()
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 5 Sep 2018 05:18:04 +0000 (15:18 +1000)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 28 Jun 2019 19:41:21 +0000 (15:41 -0400)
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.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/mapi/glapi/gen/ARB_direct_state_access.xml
src/mapi/glapi/gen/EXT_direct_state_access.xml
src/mapi/glapi/gen/static_data.py
src/mesa/main/bufferobj.c
src/mesa/main/bufferobj.h
src/mesa/main/tests/dispatch_sanity.cpp

index fa90ffcdd22f86bcd3bc1fcd0661cc119a2596d2..84ba14153d179bc14ff8690cf14bb1dca2ee3482 100644 (file)
       <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>
index 1eef0e3c39ba93d230331fa86f783380daf7ef3f..eb5c20dd108de7308a3b3728bdc6f317b62c350a 100644 (file)
       <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">
index b938942ec89be8c69fa80336344d04446e44b3bc..5829da0b51e38a8be44c8883688a4cfe4738ac7f 100644 (file)
@@ -1053,7 +1053,7 @@ offsets = {
     "TextureSubImage3D": 1017,
     "TransformFeedbackBufferBase": 1018,
     "TransformFeedbackBufferRange": 1019,
-    "UnmapNamedBuffer": 1020,
+    "UnmapNamedBufferEXT": 1020,
     "VertexArrayAttribBinding": 1021,
     "VertexArrayAttribFormat": 1022,
     "VertexArrayAttribIFormat": 1023,
index a751e41d6e8e7593efa17d384944bd9a8773e234..cd4bd36810a25bff15c9643e5151b6c4b58cdeed 100644 (file)
@@ -2688,7 +2688,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);
@@ -2697,7 +2697,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;
index c3b57ef7fe6955dc46b6f27040d75fd7f3b6067e..91df7e9c231b37a3e846f7d1f3591dbbfdd6e1b4 100644 (file)
@@ -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);
index 8cb63da17b26b7198a8640903583366d6ba6a257..b29dbdb7652d28784792389544436663a7771698 100644 (file)
@@ -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 },
@@ -1129,7 +1128,7 @@ const struct function common_desktop_functions_possible[] = {
    { "glNamedBufferDataEXT", 15, -1 },
    { "glNamedBufferSubDataEXT", 15, -1 },
    //{ "glMapNamedBufferEXT", 15, -1 },
-   //{ "glUnmapNamedBufferEXT", 15, -1 },
+   { "glUnmapNamedBufferEXT", 15, -1 },
    //{ "glGetNamedBufferParameterivEXT", 15, -1 },
    //{ "glGetNamedBufferPointervEXT", 15, -1 },
    //{ "glGetNamedBufferSubDataEXT", 15, -1 },