mesa: inline mesa_initialize_buffer_object.
This has no other users now. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14133>
This commit is contained in:
parent
131efc204d
commit
ee283c49b7
|
@ -1110,27 +1110,6 @@ get_no_minmax_cache()
|
|||
return disable;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initialize a buffer object to default values.
|
||||
*/
|
||||
void
|
||||
_mesa_initialize_buffer_object(struct gl_context *ctx,
|
||||
struct gl_buffer_object *obj,
|
||||
GLuint name)
|
||||
{
|
||||
memset(obj, 0, sizeof(struct gl_buffer_object));
|
||||
obj->RefCount = 1;
|
||||
obj->Name = name;
|
||||
obj->Usage = GL_STATIC_DRAW_ARB;
|
||||
|
||||
simple_mtx_init(&obj->MinMaxCacheMutex, mtx_plain);
|
||||
if (get_no_minmax_cache())
|
||||
obj->UsageHistory |= USAGE_DISABLE_MINMAX_CACHE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Callback called from _mesa_HashWalk()
|
||||
*/
|
||||
|
@ -1324,7 +1303,13 @@ _mesa_bufferobj_alloc(struct gl_context *ctx, GLuint id)
|
|||
if (!buf)
|
||||
return NULL;
|
||||
|
||||
_mesa_initialize_buffer_object(ctx, buf, id);
|
||||
buf->RefCount = 1;
|
||||
buf->Name = id;
|
||||
buf->Usage = GL_STATIC_DRAW_ARB;
|
||||
|
||||
simple_mtx_init(&buf->MinMaxCacheMutex, mtx_plain);
|
||||
if (get_no_minmax_cache())
|
||||
buf->UsageHistory |= USAGE_DISABLE_MINMAX_CACHE;
|
||||
return buf;
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -156,11 +156,6 @@ _mesa_multi_bind_lookup_bufferobj(struct gl_context *ctx,
|
|||
GLuint index, const char *caller,
|
||||
bool *error);
|
||||
|
||||
extern void
|
||||
_mesa_initialize_buffer_object(struct gl_context *ctx,
|
||||
struct gl_buffer_object *obj,
|
||||
GLuint name);
|
||||
|
||||
extern void
|
||||
_mesa_delete_buffer_object(struct gl_context *ctx,
|
||||
struct gl_buffer_object *bufObj);
|
||||
|
|
Loading…
Reference in New Issue