[vulkan] Destroy the tracy GPU contexts

I had forgotten about doing so because I was doing my profiling without
validation layers.
This commit is contained in:
Bill Currie 2023-12-22 13:44:31 +09:00
parent dc0b4880e3
commit f3eebae9bc
2 changed files with 4 additions and 0 deletions

View file

@ -649,6 +649,7 @@ QFV_Render_Shutdown (vulkan_ctx_t *ctx)
df->vkDestroySemaphore (dev, frame->imageAvailableSemaphore, 0);
df->vkDestroySemaphore (dev, frame->renderDoneSemaphore, 0);
QFV_CmdPoolManager_Shutdown (&frame->cmdpool);
qftCVkContextDestroy (frame->qftVkCtx);
}
DARRAY_CLEAR (&rctx->frames);

View file

@ -1903,6 +1903,8 @@ Vulkan_Lighting_Setup (vulkan_ctx_t *ctx)
.queryType = VK_QUERY_TYPE_OCCLUSION,
.queryCount = MaxLights * 6, // 6 for cube maps
}, 0, &lframe->query);
QFV_duSetObjectName (device, VK_OBJECT_TYPE_QUERY_POOL, lframe->query,
va (ctx->va_ctx, "light_cull:%zd", i));
lframe->fence = QFV_CreateFence (device, 1);
#ifdef TRACY_ENABLE
auto instance = ctx->instance->instance;
@ -1996,6 +1998,7 @@ Vulkan_Lighting_Shutdown (vulkan_ctx_t *ctx)
auto lframe = &lctx->frames.a[i];
dfunc->vkDestroyQueryPool (device->dev, lframe->query, 0);
dfunc->vkDestroyFence (device->dev, lframe->fence, 0);
qftCVkContextDestroy (lframe->qftVkCtx);
}
free (lctx->frames.a[0].stage_targets);
DARRAY_CLEAR (&lctx->light_mats);