summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-05-04 12:16:48 +1000
committerTimothy Arceri <[email protected]>2017-05-07 15:29:33 +1000
commit8a1c36015b964c55e01876caab48c6e85f5860d8 (patch)
treec874b2d839297174de9b1b718a59d2fd6df764f2
parent1151349c2afb5d6a497a6312364efa2443977a21 (diff)
mesa: make map_buffer_range() static
Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r--src/mesa/main/bufferobj.c27
-rw-r--r--src/mesa/main/bufferobj.h6
2 files changed, 13 insertions, 20 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 961871c91d5..76e035f9a29 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -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");
}
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index 259de9465a1..f9d887465dc 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -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,