From 2122d923d93ec3380ca9328dba6b98a82ff7873b Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 22 Jun 2023 20:30:10 +0900 Subject: [PATCH] [vulkan] Move the subpass command labels out a layer Just for easier debugging in renderdoc. --- libs/video/renderer/vulkan/render.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/video/renderer/vulkan/render.c b/libs/video/renderer/vulkan/render.c index 3d4945863..184244986 100644 --- a/libs/video/renderer/vulkan/render.c +++ b/libs/video/renderer/vulkan/render.c @@ -110,15 +110,12 @@ run_subpass (qfv_subpass_t *sp, VkCommandBuffer cmd, vulkan_ctx_t *ctx) qfv_device_t *device = ctx->device; qfv_devfuncs_t *dfunc = device->funcs; dfunc->vkBeginCommandBuffer (cmd, &sp->beginInfo); - QFV_duCmdBeginLabel (device, cmd, sp->label.name, - {VEC4_EXP (sp->label.color)}); for (uint32_t i = 0; i < sp->pipeline_count; i++) { __auto_type pipeline = &sp->pipelines[i]; run_pipeline (pipeline, cmd, ctx); } - QFV_duCmdEndLabel (device, cmd); dfunc->vkEndCommandBuffer (cmd); } @@ -143,8 +140,11 @@ run_renderpass (qfv_renderpass_t *rp, vulkan_ctx_t *ctx) for (uint32_t i = 0; i < rp->subpass_count; i++) { __auto_type sp = &rp->subpasses[i]; VkCommandBuffer subcmd = QFV_GetCmdBuffer (ctx, true); + QFV_duCmdBeginLabel (device, cmd, sp->label.name, + {VEC4_EXP (sp->label.color)}); run_subpass (sp, subcmd, ctx); dfunc->vkCmdExecuteCommands (cmd, 1, &subcmd); + QFV_duCmdEndLabel (device, cmd); //FIXME comment is a bit off as exactly one buffer is always submitted // //Regardless of whether any commands were submitted for this