* internal structure where somehow shared.
*/
static struct gl_buffer_object *
-intel_bufferobj_alloc(struct gl_context * ctx, GLuint name, GLenum target)
+intel_bufferobj_alloc(struct gl_context * ctx, GLuint name)
{
struct intel_buffer_object *obj = CALLOC_STRUCT(intel_buffer_object);
- _mesa_initialize_buffer_object(ctx, &obj->Base, name, target);
+ _mesa_initialize_buffer_object(ctx, &obj->Base, name);
obj->buffer = NULL;
* internal structure where somehow shared.
*/
static struct gl_buffer_object *
-intel_bufferobj_alloc(struct gl_context * ctx, GLuint name, GLenum target)
+intel_bufferobj_alloc(struct gl_context * ctx, GLuint name)
{
struct intel_buffer_object *obj = CALLOC_STRUCT(intel_buffer_object);
if (!obj) {
_mesa_error_no_memory(__func__);
}
- _mesa_initialize_buffer_object(ctx, &obj->Base, name, target);
+ _mesa_initialize_buffer_object(ctx, &obj->Base, name);
obj->buffer = NULL;
}
static struct gl_buffer_object *
-nouveau_bufferobj_new(struct gl_context *ctx, GLuint buffer, GLenum target)
+nouveau_bufferobj_new(struct gl_context *ctx, GLuint buffer)
{
struct nouveau_bufferobj *nbo;
if (!nbo)
return NULL;
- _mesa_initialize_buffer_object(ctx, &nbo->base, buffer, target);
+ _mesa_initialize_buffer_object(ctx, &nbo->base, buffer);
return &nbo->base;
}
static struct gl_buffer_object *
radeonNewBufferObject(struct gl_context * ctx,
- GLuint name,
- GLenum target)
+ GLuint name)
{
struct radeon_buffer_object *obj = CALLOC_STRUCT(radeon_buffer_object);
- _mesa_initialize_buffer_object(ctx, &obj->Base, name, target);
+ _mesa_initialize_buffer_object(ctx, &obj->Base, name);
obj->bo = NULL;
* 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;
}
* 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;
* 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;
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,
*/
/*@{*/
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 );
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++) {
* internal structure where somehow shared.
*/
static struct gl_buffer_object *
-st_bufferobj_alloc(struct gl_context *ctx, GLuint name, GLenum target)
+st_bufferobj_alloc(struct gl_context *ctx, GLuint name)
{
struct st_buffer_object *st_obj = ST_CALLOC_STRUCT(st_buffer_object);
if (!st_obj)
return NULL;
- _mesa_initialize_buffer_object(ctx, &st_obj->Base, name, target);
+ _mesa_initialize_buffer_object(ctx, &st_obj->Base, name);
return &st_obj->Base;
}
/* Allocate a real buffer object now */
_mesa_reference_buffer_object(ctx, &exec->vtx.bufferobj, NULL);
- exec->vtx.bufferobj = ctx->Driver.NewBufferObject(ctx, bufName, target);
+ exec->vtx.bufferobj = ctx->Driver.NewBufferObject(ctx, bufName);
if (!ctx->Driver.BufferData(ctx, target, size, NULL, usage,
GL_MAP_WRITE_BIT |
GL_DYNAMIC_STORAGE_BIT |
* user. Perhaps there could be a special number for internal
* buffers:
*/
- vertex_store->bufferobj = ctx->Driver.NewBufferObject(ctx,
- VBO_BUF_ID,
- GL_ARRAY_BUFFER_ARB);
+ vertex_store->bufferobj = ctx->Driver.NewBufferObject(ctx, VBO_BUF_ID);
if (vertex_store->bufferobj) {
save->out_of_memory =
!ctx->Driver.BufferData(ctx,