CommandBuffer supported DebugMaker

This commit is contained in:
2021-11-23 11:54:54 +08:00
parent e6df11e572
commit 4b6fd42451
2 changed files with 30 additions and 0 deletions

View File

@@ -24,4 +24,24 @@ bool GPUCmdBuffer::Begin()
return(true);
}
#ifdef _DEBUG
void GPUCmdBuffer::SetDebugName(const char *object_name)
{
if(dev_attr->debug_maker)
dev_attr->debug_maker->SetCommandBufferName(cmd_buf,object_name);
}
void GPUCmdBuffer::BeginRegion(const char *region_name,const Color4f &color)
{
if(dev_attr->debug_maker)
dev_attr->debug_maker->Begin(cmd_buf,region_name,color);
}
void GPUCmdBuffer::EndRegion()
{
if(dev_attr->debug_maker)
dev_attr->debug_maker->End(cmd_buf);
}
#endif
VK_NAMESPACE_END