Merge pull request #16120 from hrydgard/better-pass-naming

Vulkan: Better debug names for RENDER passes.
This commit is contained in:
Unknown W. Brackets 2022-09-27 18:22:06 -07:00 committed by GitHub
commit ebbd17540c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -559,7 +559,13 @@ void VulkanQueueRunner::RunSteps(std::vector<VKRStep *> &steps, FrameData &frame
if (emitLabels) {
VkDebugUtilsLabelEXT labelInfo{ VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT };
labelInfo.pLabelName = step.tag;
char temp[128];
if (step.stepType == VKRStepType::RENDER && step.render.framebuffer) {
snprintf(temp, sizeof(temp), "%s: %s", step.tag, step.render.framebuffer->Tag());
labelInfo.pLabelName = temp;
} else {
labelInfo.pLabelName = step.tag;
}
vkCmdBeginDebugUtilsLabelEXT(frameData.mainCmd, &labelInfo);
}

View file

@ -964,7 +964,7 @@ void FramebufferManagerCommon::NotifyRenderFramebufferSwitched(VirtualFramebuffe
if (useBufferedRendering_) {
if (vfb->fbo) {
shaderManager_->DirtyLastShader();
draw_->BindFramebufferAsRenderTarget(vfb->fbo, { Draw::RPAction::KEEP, Draw::RPAction::KEEP, Draw::RPAction::KEEP }, "FramebufferSwitch");
draw_->BindFramebufferAsRenderTarget(vfb->fbo, { Draw::RPAction::KEEP, Draw::RPAction::KEEP, Draw::RPAction::KEEP }, "FBSwitch");
} else {
// This should only happen very briefly when toggling useBufferedRendering_.
ResizeFramebufFBO(vfb, vfb->width, vfb->height, true);