update parallel rdp

This commit is contained in:
Logan McNaughton
2024-06-13 14:08:21 -06:00
parent e6ae8abd16
commit de22be4a1e
6 changed files with 57 additions and 22 deletions
@@ -3086,35 +3086,52 @@ void CommandBuffer::end()
device->request_staging_block_nolock(staging_block, 0);
}
void CommandBuffer::insert_label(const char *name, const float *color)
{
if (!device->ext.supports_debug_utils || !vkCmdInsertDebugUtilsLabelEXT)
return;
VkDebugUtilsLabelEXT info = { VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT };
if (color)
{
for (unsigned i = 0; i < 4; i++)
info.color[i] = color[i];
}
else
{
for (unsigned i = 0; i < 4; i++)
info.color[i] = 1.0f;
}
info.pLabelName = name;
vkCmdInsertDebugUtilsLabelEXT(cmd, &info);
}
void CommandBuffer::begin_region(const char *name, const float *color)
{
if (device->ext.supports_debug_utils)
{
VkDebugUtilsLabelEXT info = { VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT };
if (color)
{
for (unsigned i = 0; i < 4; i++)
info.color[i] = color[i];
}
else
{
for (unsigned i = 0; i < 4; i++)
info.color[i] = 1.0f;
}
if (!device->ext.supports_debug_utils || !vkCmdBeginDebugUtilsLabelEXT)
return;
info.pLabelName = name;
if (vkCmdBeginDebugUtilsLabelEXT)
vkCmdBeginDebugUtilsLabelEXT(cmd, &info);
VkDebugUtilsLabelEXT info = { VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT };
if (color)
{
for (unsigned i = 0; i < 4; i++)
info.color[i] = color[i];
}
else
{
for (unsigned i = 0; i < 4; i++)
info.color[i] = 1.0f;
}
info.pLabelName = name;
vkCmdBeginDebugUtilsLabelEXT(cmd, &info);
}
void CommandBuffer::end_region()
{
if (device->ext.supports_debug_utils)
{
if (vkCmdEndDebugUtilsLabelEXT)
vkCmdEndDebugUtilsLabelEXT(cmd);
}
if (device->ext.supports_debug_utils && vkCmdEndDebugUtilsLabelEXT)
vkCmdEndDebugUtilsLabelEXT(cmd);
}
void CommandBuffer::enable_profiling()