Graphics/FrameGraph: Add support for pass name (as debug sections)

This commit is contained in:
Jérôme Leclercq
2021-05-14 01:45:45 +02:00
parent ee690072f8
commit 9376cfefd2
6 changed files with 24 additions and 3 deletions

View File

@@ -54,6 +54,9 @@ namespace Nz
builder.TextureBarrier(textureTransition.srcStageMask, textureTransition.dstStageMask, textureTransition.srcAccessMask, textureTransition.dstAccessMask, textureTransition.oldLayout, textureTransition.newLayout, *texture);
}
if (!passData.name.empty())
builder.BeginDebugRegion(passData.name, Nz::Color::Green);
builder.BeginRenderPass(*passData.framebuffer, *passData.renderPass, passData.renderRect);
bool first = true;
@@ -68,6 +71,9 @@ namespace Nz
}
builder.EndRenderPass();
if (!passData.name.empty())
builder.EndDebugRegion();
});
}