[Mesa-dev] [PATCH 07/18] mesa: make _mesa_flush_mapped_buffer_range() static
Timothy Arceri
tarceri at itsqueeze.com
Thu May 4 07:41:32 UTC 2017
---
src/mesa/main/bufferobj.c | 18 +++++++++---------
src/mesa/main/bufferobj.h | 6 ------
2 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 6fa32e9..75526b5 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -2770,25 +2770,25 @@ _mesa_MapNamedBuffer(GLuint buffer, GLenum access)
if (!validate_map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags,
"glMapNamedBuffer"))
return NULL;
return map_buffer_range(ctx, bufObj, 0, bufObj->Size, accessFlags,
"glMapNamedBuffer");
}
-void
-_mesa_flush_mapped_buffer_range(struct gl_context *ctx,
- struct gl_buffer_object *bufObj,
- GLintptr offset, GLsizeiptr length,
- const char *func)
+static void
+flush_mapped_buffer_range(struct gl_context *ctx,
+ struct gl_buffer_object *bufObj,
+ GLintptr offset, GLsizeiptr length,
+ const char *func)
{
if (!ctx->Extensions.ARB_map_buffer_range) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s(ARB_map_buffer_range not supported)", func);
return;
}
if (offset < 0) {
_mesa_error(ctx, GL_INVALID_VALUE,
"%s(offset %ld < 0)", func, (long) offset);
@@ -2835,38 +2835,38 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset,
GLsizeiptr length)
{
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
bufObj = get_buffer(ctx, "glFlushMappedBufferRange", target,
GL_INVALID_OPERATION);
if (!bufObj)
return;
- _mesa_flush_mapped_buffer_range(ctx, bufObj, offset, length,
- "glFlushMappedBufferRange");
+ flush_mapped_buffer_range(ctx, bufObj, offset, length,
+ "glFlushMappedBufferRange");
}
void GLAPIENTRY
_mesa_FlushMappedNamedBufferRange(GLuint buffer, GLintptr offset,
GLsizeiptr length)
{
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
"glFlushMappedNamedBufferRange");
if (!bufObj)
return;
- _mesa_flush_mapped_buffer_range(ctx, bufObj, offset, length,
- "glFlushMappedNamedBufferRange");
+ flush_mapped_buffer_range(ctx, bufObj, offset, length,
+ "glFlushMappedNamedBufferRange");
}
/**
* Binds a buffer object to a uniform buffer binding point.
*
* The caller is responsible for flushing vertices and updating
* NewDriverState.
*/
static void
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index d538d0f..44fcaaa 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -152,26 +152,20 @@ _mesa_buffer_unmap_all_mappings(struct gl_context *ctx,
struct gl_buffer_object *bufObj);
extern void
_mesa_copy_buffer_sub_data(struct gl_context *ctx,
struct gl_buffer_object *src,
struct gl_buffer_object *dst,
GLintptr readOffset, GLintptr writeOffset,
GLsizeiptr size, const char *func);
extern void
-_mesa_flush_mapped_buffer_range(struct gl_context *ctx,
- struct gl_buffer_object *bufObj,
- GLintptr offset, GLsizeiptr length,
- const char *func);
-
-extern void
_mesa_ClearBufferSubData_sw(struct gl_context *ctx,
GLintptr offset, GLsizeiptr size,
const GLvoid *clearValue,
GLsizeiptr clearValueSize,
struct gl_buffer_object *bufObj);
extern void
_mesa_clear_buffer_sub_data(struct gl_context *ctx,
struct gl_buffer_object *bufObj,
GLenum internalformat,
--
2.9.3
More information about the mesa-dev
mailing list