summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_bufmgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_bufmgr.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_bufmgr.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_bufmgr.c b/src/gallium/drivers/vc4/vc4_bufmgr.c
index 274c4c3120b..54f9d9c2642 100644
--- a/src/gallium/drivers/vc4/vc4_bufmgr.c
+++ b/src/gallium/drivers/vc4/vc4_bufmgr.c
@@ -30,6 +30,7 @@
#include "util/u_hash_table.h"
#include "util/u_memory.h"
+#include "util/u_string.h"
#include "util/ralloc.h"
#include "vc4_context.h"
@@ -49,6 +50,13 @@ static void
vc4_bo_cache_free_all(struct vc4_bo_cache *cache);
void
+vc4_bo_debug_describe(char* buf, const struct vc4_bo *ptr)
+{
+ util_sprintf(buf, "vc4_bo<%s,%u,%u>", ptr->name ? ptr->name : "?",
+ ptr->handle, ptr->size);
+}
+
+void
vc4_bo_label(struct vc4_screen *screen, struct vc4_bo *bo, const char *fmt, ...)
{
/* Perform BO labeling by default on debug builds (so that you get
@@ -389,7 +397,7 @@ vc4_bo_open_handle(struct vc4_screen *screen,
bo = util_hash_table_get(screen->bo_handles, (void*)(uintptr_t)handle);
if (bo) {
- pipe_reference(NULL, &bo->reference);
+ vc4_bo_reference(bo);
goto done;
}