Don't call vkCmdEndDebugUtilsLabelEXT when unsupported (#2211)

Validation will swamp your logs with a warning on every call
This commit is contained in:
Edu Garcia
2020-07-24 16:58:31 +01:00
committed by GitHub
parent a40c3e6d45
commit f95a596851

View File

@@ -262,10 +262,13 @@
BGFX_PROFILER_BEGIN_LITERAL("" _name, _abgr); \
BX_MACRO_BLOCK_END
#define BGFX_VK_PROFILER_END() \
BX_MACRO_BLOCK_BEGIN \
BGFX_PROFILER_END(); \
vkCmdEndDebugUtilsLabelEXT(m_commandBuffer); \
#define BGFX_VK_PROFILER_END() \
BX_MACRO_BLOCK_BEGIN \
BGFX_PROFILER_END(); \
if (s_extension[Extension::EXT_debug_utils].m_supported ) \
{ \
vkCmdEndDebugUtilsLabelEXT(m_commandBuffer); \
} \
BX_MACRO_BLOCK_END
namespace bgfx { namespace vk