summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-10-15 13:00:39 -0700
committerKenneth Graunke <[email protected]>2014-10-16 10:56:19 -0700
commit63c6509ad2e2707cca0ff3ba6fbc5582c3e2eea5 (patch)
tree23d89d1d6dd4d0ffa274af59c8ebcc32ec0ece27 /src/mesa/main
parentaf31f930ab824e018407dcbeb242100036b3c458 (diff)
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 <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/bufferobj.c14
-rw-r--r--src/mesa/main/bufferobj.h2
-rw-r--r--src/mesa/main/dd.h2
-rw-r--r--src/mesa/main/shared.c2
4 files changed, 9 insertions, 11 deletions
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;
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index 0779605c08b..fe294fc0bed 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -103,7 +103,7 @@ _mesa_multi_bind_lookup_bufferobj(struct gl_context *ctx,
extern void
_mesa_initialize_buffer_object(struct gl_context *ctx,
struct gl_buffer_object *obj,
- GLuint name, GLenum target);
+ GLuint name);
extern void
_mesa_reference_buffer_object_(struct gl_context *ctx,
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index c130b14a522..c07e83ad911 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -602,7 +602,7 @@ struct dd_function_table {
*/
/*@{*/
struct gl_buffer_object * (*NewBufferObject)(struct gl_context *ctx,
- GLuint buffer, GLenum target);
+ GLuint buffer);
void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj );
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index 7ef932ff052..f74a8232f43 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -86,7 +86,7 @@ _mesa_alloc_shared_state(struct gl_context *ctx)
shared->SamplerObjects = _mesa_NewHashTable();
/* Allocate the default buffer object */
- shared->NullBufferObj = ctx->Driver.NewBufferObject(ctx, 0, 0);
+ shared->NullBufferObj = ctx->Driver.NewBufferObject(ctx, 0);
/* Create default texture objects */
for (i = 0; i < NUM_TEXTURE_TARGETS; i++) {