Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

Commit

Permalink
Provide bo name similar to v3d_bo_alloc.
Browse files Browse the repository at this point in the history
  • Loading branch information
abergmeier committed Nov 29, 2019
1 parent 3dde9fd commit 8e30824
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/broadcom/vulkan/v3d_cl.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ v3d_cl_ensure_space_with_branch(struct v3d_cl *cl, uint32_t space)
if (!new_bo)
return; // FIXME: Handle this properly

new_bo->name = "CL";

VkResult result = v3dvk_bo_init_new(cl->dev, new_bo, space);
VkResult result = v3dvk_bo_init_new(cl->dev, new_bo, "CL", space);
if (result != VK_SUCCESS) {
// FIXME: Properly handle this
assert(false);
Expand Down
7 changes: 4 additions & 3 deletions src/broadcom/vulkan/v3dvk_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,17 @@ v3dvk_bo_init(struct v3dvk_bo *bo,
}

VkResult
v3dvk_bo_init_new(struct v3dvk_device *dev, struct v3dvk_bo *bo, uint64_t size)
v3dvk_bo_init_new(struct v3dvk_device *dev, struct v3dvk_bo *bo, uint64_t size, const char* name)
{
assert(bo);
assert(name);
/* The CLIF dumping requires that there is no whitespace in the name.
*/
assert(!strchr(bo->name, ' '));
assert(!strchr(name, ' '));

size = align(size, 4096);

VkResult result = v3dvk_bo_init(bo, bo->name, size);
VkResult result = v3dvk_bo_init(bo, name, size);
if (result != VK_SUCCESS) {
return result;
}
Expand Down
2 changes: 1 addition & 1 deletion src/broadcom/vulkan/v3dvk_bo.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ struct v3dvk_bo {


VkResult
v3dvk_bo_init_new(struct v3dvk_device *dev, struct v3dvk_bo *bo, uint64_t size);
v3dvk_bo_init_new(struct v3dvk_device *dev, struct v3dvk_bo *bo, uint64_t size, const char* name);
void
v3dvk_bo_finish(struct v3dvk_device *dev, struct v3dvk_bo *bo);

Expand Down
4 changes: 2 additions & 2 deletions src/broadcom/vulkan/v3dvk_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ v3dvk_alloc_memory(struct v3dvk_device *device,
#endif
if (pAllocateInfo->allocationSize == 0) {
result =
v3dvk_bo_init_new(device, &mem->bo, 1);
v3dvk_bo_init_new(device, &mem->bo, 1, "alloc");
} else {
result =
v3dvk_bo_init_new(device, &mem->bo, pAllocateInfo->allocationSize);
v3dvk_bo_init_new(device, &mem->bo, pAllocateInfo->allocationSize, "alloc");
}
#if 0
}
Expand Down

0 comments on commit 8e30824

Please sign in to comment.