[Mesa-dev] [PATCH 11/18] make: _mesa_buffer_storage() static
Timothy Arceri
tarceri at itsqueeze.com
Thu May 4 07:41:36 UTC 2017
---
src/mesa/main/bufferobj.c | 15 +++++++--------
src/mesa/main/bufferobj.h | 5 -----
2 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 0a8f030..6161271 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1498,24 +1498,24 @@ _mesa_IsBuffer(GLuint id)
struct gl_buffer_object *bufObj;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
bufObj = _mesa_lookup_bufferobj(ctx, id);
return bufObj && bufObj != &DummyBufferObject;
}
-void
-_mesa_buffer_storage(struct gl_context *ctx, struct gl_buffer_object *bufObj,
- GLenum target, GLsizeiptr size, const GLvoid *data,
- GLbitfield flags, const char *func)
+static void
+buffer_storage(struct gl_context *ctx, struct gl_buffer_object *bufObj,
+ GLenum target, GLsizeiptr size, const GLvoid *data,
+ GLbitfield flags, const char *func)
{
if (size <= 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s(size <= 0)", func);
return;
}
GLbitfield valid_flags = GL_MAP_READ_BIT |
GL_MAP_WRITE_BIT |
GL_MAP_PERSISTENT_BIT |
GL_MAP_COHERENT_BIT |
@@ -1589,41 +1589,40 @@ void GLAPIENTRY
_mesa_BufferStorage(GLenum target, GLsizeiptr size, const GLvoid *data,
GLbitfield flags)
{
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
bufObj = get_buffer(ctx, "glBufferStorage", target, GL_INVALID_OPERATION);
if (!bufObj)
return;
- _mesa_buffer_storage(ctx, bufObj, target, size, data, flags,
- "glBufferStorage");
+ buffer_storage(ctx, bufObj, target, size, data, flags, "glBufferStorage");
}
void GLAPIENTRY
_mesa_NamedBufferStorage(GLuint buffer, GLsizeiptr size, const GLvoid *data,
GLbitfield flags)
{
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glNamedBufferStorage");
if (!bufObj)
return;
/*
* In direct state access, buffer objects have an unspecified target since
* they are not required to be bound.
*/
- _mesa_buffer_storage(ctx, bufObj, GL_NONE, size, data, flags,
- "glNamedBufferStorage");
+ buffer_storage(ctx, bufObj, GL_NONE, size, data, flags,
+ "glNamedBufferStorage");
}
void
_mesa_buffer_data(struct gl_context *ctx, struct gl_buffer_object *bufObj,
GLenum target, GLsizeiptr size, const GLvoid *data,
GLenum usage, const char *func)
{
bool valid_usage;
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index fefb013..93a360d 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -126,25 +126,20 @@ _mesa_reference_buffer_object(struct gl_context *ctx,
_mesa_reference_buffer_object_(ctx, ptr, bufObj);
}
extern GLuint
_mesa_total_buffer_object_memory(struct gl_context *ctx);
extern void
_mesa_init_buffer_object_functions(struct dd_function_table *driver);
extern void
-_mesa_buffer_storage(struct gl_context *ctx, struct gl_buffer_object *bufObj,
- GLenum target, GLsizeiptr size, const GLvoid *data,
- GLbitfield flags, const char *func);
-
-extern void
_mesa_buffer_data(struct gl_context *ctx, struct gl_buffer_object *bufObj,
GLenum target, GLsizeiptr size, const GLvoid *data,
GLenum usage, const char *func);
extern void
_mesa_buffer_sub_data(struct gl_context *ctx, struct gl_buffer_object *bufObj,
GLintptr offset, GLsizeiptr size, const GLvoid *data,
const char *func);
extern void
--
2.9.3
More information about the mesa-dev
mailing list