From 63c6509ad2e2707cca0ff3ba6fbc5582c3e2eea5 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 15 Oct 2014 13:00:39 -0700 Subject: mesa: Drop the "target" parameter from NewBufferObject(). NewBufferObject took a "target" parameter, which it blindly passed to _mesa_initialize_buffer_object(), which ignored it. Not much point in passing it around. Signed-off-by: Kenneth Graunke Reviewed-by: Brian Paul Reviewed-by: Ian Romanick --- src/mesa/main/bufferobj.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/mesa/main/bufferobj.c') diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index d6483080c6e..0ee88560ffd 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -389,14 +389,14 @@ convert_clear_buffer_data(struct gl_context *ctx, * Default callback for the \c dd_function_table::NewBufferObject() hook. */ static struct gl_buffer_object * -_mesa_new_buffer_object( struct gl_context *ctx, GLuint name, GLenum target ) +_mesa_new_buffer_object(struct gl_context *ctx, GLuint name) { struct gl_buffer_object *obj; (void) ctx; obj = MALLOC_STRUCT(gl_buffer_object); - _mesa_initialize_buffer_object(ctx, obj, name, target); + _mesa_initialize_buffer_object(ctx, obj, name); return obj; } @@ -494,12 +494,10 @@ _mesa_reference_buffer_object_(struct gl_context *ctx, * Initialize a buffer object to default values. */ void -_mesa_initialize_buffer_object( struct gl_context *ctx, - struct gl_buffer_object *obj, - GLuint name, GLenum target ) +_mesa_initialize_buffer_object(struct gl_context *ctx, + struct gl_buffer_object *obj, + GLuint name) { - (void) target; - memset(obj, 0, sizeof(struct gl_buffer_object)); mtx_init(&obj->Mutex, mtx_plain); obj->RefCount = 1; @@ -906,7 +904,7 @@ _mesa_handle_bind_buffer_gen(struct gl_context *ctx, * never used before, allocate a buffer object now. */ ASSERT(ctx->Driver.NewBufferObject); - buf = ctx->Driver.NewBufferObject(ctx, buffer, target); + buf = ctx->Driver.NewBufferObject(ctx, buffer); if (!buf) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", caller); return false; -- cgit v1.2.3