renderer: debug markers for ability to match cmdlists with rdoc captures

This commit is contained in:
psucien 2024-07-14 11:37:52 +02:00
parent 8144f835a9
commit b8916787b2
4 changed files with 34 additions and 4 deletions

View file

@ -254,4 +254,16 @@ void Rasterizer::UpdateDepthStencilState() {
cmdbuf.setDepthBoundsTestEnable(depth.depth_bounds_enable);
}
void Rasterizer::ScopeMarkerBegin(const std::string& str) {
const auto cmdbuf = scheduler.CommandBuffer();
cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{
.pLabelName = str.c_str(),
});
}
void Rasterizer::ScopeMarkerEnd() {
const auto cmdbuf = scheduler.CommandBuffer();
cmdbuf.endDebugUtilsLabelEXT();
}
} // namespace Vulkan

View file

@ -33,6 +33,9 @@ public:
void DispatchDirect();
void ScopeMarkerBegin(const std::string& str);
void ScopeMarkerEnd();
private:
u32 SetupIndexBuffer(bool& is_indexed, u32 index_offset);
void MapMemory(VAddr addr, size_t size);