diff --git a/src/broadcom/vulkan/v3dv_cl.c b/src/broadcom/vulkan/v3dv_cl.c index 55cf122cca8..62e6144e7ec 100644 --- a/src/broadcom/vulkan/v3dv_cl.c +++ b/src/broadcom/vulkan/v3dv_cl.c @@ -58,6 +58,11 @@ v3dv_cl_destroy(struct v3dv_cl *cl) static bool cl_alloc_bo(struct v3dv_cl *cl, uint32_t space, bool use_branch) { + /* If we are growing, double the BO allocation size to reduce the number + * of allocations with large command buffers. This has a very significant + * impact on the number of draw calls per second reported by vkoverhead. + */ + space = cl->bo ? cl->bo->size * 2 : align(space, 4096); struct v3dv_bo *bo = v3dv_bo_alloc(cl->job->device, space, "CL", true); if (!bo) { fprintf(stderr, "failed to allocate memory for command list\n");