mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 10:20:20 +01:00
tu: Give suballoc bo's a name
So they show up in gem debugfs with a more useful label. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27700>
This commit is contained in:
parent
bcc5ddcc3b
commit
e7ee2c8ca5
3 changed files with 11 additions and 6 deletions
|
|
@ -2277,12 +2277,12 @@ tu_CreateDevice(VkPhysicalDevice physicalDevice,
|
|||
|
||||
tu_bo_suballocator_init(
|
||||
&device->pipeline_suballoc, device, 128 * 1024,
|
||||
(enum tu_bo_alloc_flags) (TU_BO_ALLOC_GPU_READ_ONLY | TU_BO_ALLOC_ALLOW_DUMP));
|
||||
(enum tu_bo_alloc_flags) (TU_BO_ALLOC_GPU_READ_ONLY | TU_BO_ALLOC_ALLOW_DUMP), "pipeline_suballoc");
|
||||
tu_bo_suballocator_init(&device->autotune_suballoc, device,
|
||||
128 * 1024, TU_BO_ALLOC_NO_FLAGS);
|
||||
128 * 1024, TU_BO_ALLOC_NO_FLAGS, "autotune_suballoc");
|
||||
if (is_kgsl(physical_device->instance)) {
|
||||
tu_bo_suballocator_init(&device->kgsl_profiling_suballoc, device,
|
||||
128 * 1024, TU_BO_ALLOC_NO_FLAGS);
|
||||
128 * 1024, TU_BO_ALLOC_NO_FLAGS, "kgsl_profiling_suballoc");
|
||||
}
|
||||
|
||||
result = tu_bo_init_new(device, &device->global_bo, global_size,
|
||||
|
|
|
|||
|
|
@ -28,13 +28,15 @@ void
|
|||
tu_bo_suballocator_init(struct tu_suballocator *suballoc,
|
||||
struct tu_device *dev,
|
||||
uint32_t default_size,
|
||||
enum tu_bo_alloc_flags flags)
|
||||
enum tu_bo_alloc_flags flags,
|
||||
const char *name)
|
||||
{
|
||||
suballoc->dev = dev;
|
||||
suballoc->default_size = default_size;
|
||||
suballoc->flags = flags;
|
||||
suballoc->bo = NULL;
|
||||
suballoc->cached_bo = NULL;
|
||||
suballoc->name = name;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -82,7 +84,7 @@ tu_suballoc_bo_alloc(struct tu_suballoc_bo *suballoc_bo,
|
|||
if (!suballoc->bo) {
|
||||
VkResult result = tu_bo_init_new(suballoc->dev, &suballoc->bo,
|
||||
alloc_size,
|
||||
suballoc->flags, "suballoc");
|
||||
suballoc->flags, suballoc->name);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ struct tu_suballocator
|
|||
|
||||
/** Optional BO cached for recycling as the next suballoc->bo, instead of having to allocate one. */
|
||||
struct tu_bo *cached_bo;
|
||||
|
||||
const char *name;
|
||||
};
|
||||
|
||||
struct tu_suballoc_bo
|
||||
|
|
@ -41,7 +43,8 @@ void
|
|||
tu_bo_suballocator_init(struct tu_suballocator *suballoc,
|
||||
struct tu_device *dev,
|
||||
uint32_t default_size,
|
||||
enum tu_bo_alloc_flags flags);
|
||||
enum tu_bo_alloc_flags flags,
|
||||
const char *name);
|
||||
void
|
||||
tu_bo_suballocator_finish(struct tu_suballocator *suballoc);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue