[vulkan] Name the managed command buffer pool

Not that it mattered in the end, but it helps with debugging (found the
bug while doing the edits).
This commit is contained in:
Bill Currie 2023-06-22 20:00:50 +09:00
parent 836290aa74
commit 854b612597
3 changed files with 11 additions and 6 deletions

View File

@ -42,8 +42,10 @@ typedef struct qfv_cmdpoolmgr_s {
struct qfv_queue_s;
qfv_cmdpoolmgr_t *QFV_CmdPoolManager_Init (qfv_cmdpoolmgr_t *manager,
struct qfv_device_s *device);
qfv_cmdpoolmgr_t *QFV_CmdPoolManager_New (struct qfv_device_s *device);
struct qfv_device_s *device,
const char *name);
qfv_cmdpoolmgr_t *QFV_CmdPoolManager_New (struct qfv_device_s *device,
const char *name);
void QFV_CmdPoolManager_Shutdown (qfv_cmdpoolmgr_t *manager);
void QFV_CmdPoolManager_Delete (qfv_cmdpoolmgr_t *manager);
void QFV_CmdPoolManager_Reset (qfv_cmdpoolmgr_t *manager);

View File

@ -32,7 +32,8 @@
#include "QF/Vulkan/device.h"
qfv_cmdpoolmgr_t *
QFV_CmdPoolManager_Init (qfv_cmdpoolmgr_t *manager, qfv_device_t *device)
QFV_CmdPoolManager_Init (qfv_cmdpoolmgr_t *manager, qfv_device_t *device,
const char *name)
{
*manager = (qfv_cmdpoolmgr_t) {
.primary = DARRAY_STATIC_INIT (16),
@ -51,9 +52,10 @@ QFV_CmdPoolManager_Init (qfv_cmdpoolmgr_t *manager, qfv_device_t *device)
}
qfv_cmdpoolmgr_t *
QFV_CmdPoolManager_New (qfv_device_t *device)
QFV_CmdPoolManager_New (qfv_device_t *device, const char *name)
{
return QFV_CmdPoolManager_Init (malloc (sizeof (qfv_cmdpoolmgr_t)), device);
return QFV_CmdPoolManager_Init (malloc (sizeof (qfv_cmdpoolmgr_t)), device,
name);
}
void

View File

@ -443,7 +443,8 @@ QFV_Render_Init (vulkan_ctx_t *ctx)
frame->imageAvailableSemaphore,
va (ctx->va_ctx, "sc image:%zd", i));
frame->renderDoneSemaphore = QFV_CreateSemaphore (device);
QFV_CmdPoolManager_Init (&frame->cmdpool, device);
QFV_CmdPoolManager_Init (&frame->cmdpool, device,
va (ctx->va_ctx, "render pool:%zd", i));
}
}