diff options
author | quou <quou@disroot.org> | 2024-12-29 23:06:39 +1100 |
---|---|---|
committer | quou <quou@disroot.org> | 2024-12-29 23:27:51 +1100 |
commit | 39fc0b5af67aa2dc0763394b0727e919840f9f57 (patch) | |
tree | 1bc1cf8544022bfad1e98059f48edc267b00ea23 /video.cpp | |
parent | 80b8a59afce450a87af7ca4082529d899b639779 (diff) |
debug markers
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 ) { |