Mesa (main): mesa: inline mesa_initialize_buffer_object.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Dec 15 14:02:50 UTC 2021
Module: Mesa
Branch: main
Commit: ee283c49b7b1268a6bb50f5e2ed279fb72f03c4b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee283c49b7b1268a6bb50f5e2ed279fb72f03c4b
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Dec 9 14:23:56 2021 +1000
mesa: inline mesa_initialize_buffer_object.
This has no other users now.
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14133>
---
src/mesa/main/bufferobj.c | 29 +++++++----------------------
src/mesa/main/bufferobj.h | 5 -----
2 files changed, 7 insertions(+), 27 deletions(-)
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 1d54cf89950..e7546ec1d64 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -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;
}
/**
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index 642e24237db..aa02b6298a1 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -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);
More information about the mesa-commit
mailing list