diff options
Diffstat (limited to 'video.cpp')
-rw-r--r-- | video.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -2303,6 +2303,25 @@ void Context::transition(Texture_Id id, Resource_State state) { ); } +void Context::debug_push(const char* name) { +#ifdef DEBUG + VkDebugUtilsLabelEXT l{}; + Context_Vk* ctx = (Context_Vk*)this; + l.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT; + l.pLabelName = name; + vkCmdBeginDebugUtilsLabelEXT(ctx->cb, &l); +#else + (void)name; +#endif +} + +void Context::debug_pop() { +#ifdef DEBUG + Context_Vk* ctx = (Context_Vk*)this; + vkCmdEndDebugUtilsLabelEXT(ctx->cb); +#endif +} + std::pair<Renderpass_Vk&, Framebuffer_Vk&> Context_Vk::begin_rp( const Render_Pass& rp ) { |