mesa: make map_buffer_range() static
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 4 May 2017 02:16:48 +0000 (12:16 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Sun, 7 May 2017 05:29:33 +0000 (15:29 +1000)
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/bufferobj.c
src/mesa/main/bufferobj.h

index 961871c91d55ecdc16cd485dd975ca89ae971559..76e035f9a294a32fd4cdd5accb4c8127577ba23f 100644 (file)
@@ -2379,11 +2379,10 @@ _mesa_CopyNamedBufferSubData(GLuint readBuffer, GLuint writeBuffer,
 }
 
 
-void *
-_mesa_map_buffer_range(struct gl_context *ctx,
-                       struct gl_buffer_object *bufObj,
-                       GLintptr offset, GLsizeiptr length,
-                       GLbitfield access, const char *func)
+static void *
+map_buffer_range(struct gl_context *ctx, struct gl_buffer_object *bufObj,
+                 GLintptr offset, GLsizeiptr length, GLbitfield access,
+                 const char *func)
 {
    void *map;
    GLbitfield allowed_access;
@@ -2586,8 +2585,8 @@ _mesa_MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length,
    if (!bufObj)
       return NULL;
 
-   return _mesa_map_buffer_range(ctx, bufObj, offset, length, access,
-                                 "glMapBufferRange");
+   return map_buffer_range(ctx, bufObj, offset, length, access,
+                           "glMapBufferRange");
 }
 
 void * GLAPIENTRY
@@ -2608,13 +2607,13 @@ _mesa_MapNamedBufferRange(GLuint buffer, GLintptr offset, GLsizeiptr length,
    if (!bufObj)
       return NULL;
 
-   return _mesa_map_buffer_range(ctx, bufObj, offset, length, access,
-                                 "glMapNamedBufferRange");
+   return map_buffer_range(ctx, bufObj, offset, length, access,
+                           "glMapNamedBufferRange");
 }
 
 /**
  * Converts GLenum access from MapBuffer and MapNamedBuffer into
- * flags for input to _mesa_map_buffer_range.
+ * flags for input to map_buffer_range.
  *
  * \return true if the type of requested access is permissible.
  */
@@ -2653,8 +2652,8 @@ _mesa_MapBuffer(GLenum target, GLenum access)
    if (!bufObj)
       return NULL;
 
-   return _mesa_map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags,
-                                 "glMapBuffer");
+   return map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags,
+                           "glMapBuffer");
 }
 
 void * GLAPIENTRY
@@ -2673,8 +2672,8 @@ _mesa_MapNamedBuffer(GLuint buffer, GLenum access)
    if (!bufObj)
       return NULL;
 
-   return _mesa_map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags,
-                                 "glMapNamedBuffer");
+   return map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags,
+                           "glMapNamedBuffer");
 }
 
 
index 259de9465a11e984400fca8f16354d19e60a2e3e..f9d887465dc0ba1b4044d9a07ffb4a88357be939 100644 (file)
@@ -158,12 +158,6 @@ _mesa_copy_buffer_sub_data(struct gl_context *ctx,
                            GLintptr readOffset, GLintptr writeOffset,
                            GLsizeiptr size, const char *func);
 
-extern void *
-_mesa_map_buffer_range(struct gl_context *ctx,
-                       struct gl_buffer_object *bufObj,
-                       GLintptr offset, GLsizeiptr length,
-                       GLbitfield access, const char *func);
-
 extern void
 _mesa_flush_mapped_buffer_range(struct gl_context *ctx,
                                 struct gl_buffer_object *bufObj,