summaryrefslogtreecommitdiff
path: root/video.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'video.cpp')
-rw-r--r--video.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/video.cpp b/video.cpp
index 586a78e..165dd9b 100644
--- a/video.cpp
+++ b/video.cpp
@@ -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
) {