[Mesa-dev] [PATCH 04/18] mesa: make _mesa_unmap_buffer() static

Timothy Arceri tarceri at itsqueeze.com
Thu May 4 07:41:29 UTC 2017


---
 src/mesa/main/bufferobj.c | 10 +++++-----
 src/mesa/main/bufferobj.h |  4 ----
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index d1726d6..f6822c7 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1996,23 +1996,23 @@ _mesa_ClearNamedBufferSubData(GLuint buffer, GLenum internalformat,
                                        "glClearNamedBufferSubData");
    if (!bufObj)
       return;
 
    _mesa_clear_buffer_sub_data(ctx, bufObj, internalformat, offset, size,
                                format, type, data,
                                "glClearNamedBufferSubData", true);
 }
 
 
-GLboolean
-_mesa_unmap_buffer(struct gl_context *ctx, struct gl_buffer_object *bufObj,
-                   const char *func)
+static GLboolean
+unmap_buffer(struct gl_context *ctx, struct gl_buffer_object *bufObj,
+             const char *func)
 {
    GLboolean status = GL_TRUE;
    ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
 
    if (!_mesa_bufferobj_mapped(bufObj, MAP_USER)) {
       _mesa_error(ctx, GL_INVALID_OPERATION,
                   "%s(buffer is not mapped)", func);
       return GL_FALSE;
    }
 
@@ -2064,34 +2064,34 @@ _mesa_unmap_buffer(struct gl_context *ctx, struct gl_buffer_object *bufObj,
 GLboolean GLAPIENTRY
 _mesa_UnmapBuffer(GLenum target)
 {
    GET_CURRENT_CONTEXT(ctx);
    struct gl_buffer_object *bufObj;
 
    bufObj = get_buffer(ctx, "glUnmapBuffer", target, GL_INVALID_OPERATION);
    if (!bufObj)
       return GL_FALSE;
 
-   return _mesa_unmap_buffer(ctx, bufObj, "glUnmapBuffer");
+   return unmap_buffer(ctx, bufObj, "glUnmapBuffer");
 }
 
 GLboolean GLAPIENTRY
 _mesa_UnmapNamedBuffer(GLuint buffer)
 {
    GET_CURRENT_CONTEXT(ctx);
    struct gl_buffer_object *bufObj;
 
    bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glUnmapNamedBuffer");
    if (!bufObj)
       return GL_FALSE;
 
-   return _mesa_unmap_buffer(ctx, bufObj, "glUnmapNamedBuffer");
+   return unmap_buffer(ctx, bufObj, "glUnmapNamedBuffer");
 }
 
 
 static bool
 get_buffer_parameter(struct gl_context *ctx,
                      struct gl_buffer_object *bufObj, GLenum pname,
                      GLint64 *params, const char *func)
 {
    switch (pname) {
    case GL_BUFFER_SIZE_ARB:
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index f95e31a..30e3105 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -173,24 +173,20 @@ _mesa_ClearBufferSubData_sw(struct gl_context *ctx,
 
 extern void
 _mesa_clear_buffer_sub_data(struct gl_context *ctx,
                             struct gl_buffer_object *bufObj,
                             GLenum internalformat,
                             GLintptr offset, GLsizeiptr size,
                             GLenum format, GLenum type,
                             const GLvoid *data,
                             const char *func, bool subdata);
 
-extern GLboolean
-_mesa_unmap_buffer(struct gl_context *ctx, struct gl_buffer_object *bufObj,
-                   const char *func);
-
 /*
  * API functions
  */
 void GLAPIENTRY
 _mesa_BindBuffer(GLenum target, GLuint buffer);
 
 void GLAPIENTRY
 _mesa_DeleteBuffers(GLsizei n, const GLuint * buffer);
 
 void GLAPIENTRY
-- 
2.9.3



More information about the mesa-dev mailing list